I am new to godot and im getting the error Invalid call. Nonexistent function 'update' in base 'Panel'

Godot Version

Question

I am new to godot and im getting the error Invalid call. Nonexistent function 'update' in base 'Panel' and this is my code extends Control

@onready var inv: Inv = preload(“res://inventory/playerinv.tres”)
@onready var slots: Array = $NinePatchRect/GridContainer.get_children()

var is_open = false

func _ready():
update_slots()
close()

func update_slots():
for i in range(min(inv.items.size(), slots.size())):
slots[i].update(inv.items[i])

There is no such function called update in panel or in the ancestry.

1 Like

thats what it says for me i could send a screenshot

you’re getting that confused with another node that has .update built in. it doesn’t apply to a panel. i get that all the time with move_and_collide() for CharacterBody3D. Also, a useless function.

Here’s a list of available methods for panel. It points back to control.
https://docs.godotengine.org/en/stable/classes/class_control.html#class-control
The menu is on the left.