Ok, so what that means is it’s on line 3 of Inven_slot.gd.
@onready var item: Item = $“../Item”
So $“../Item” is an object made from the New_Item.gd script. And the item variable is expecting an object made from the Inven_slot.gd script.
So it looks like you called the Inven_slot.gd script the Item class.
Change line 1 of that script to read:
class_name InventorySlot extends Area2D
Then change the first line of the New_Item.gd script to read:
class_name Item extends Node2D
That should solve that error.
A few other things:
There’s no reason to shorten names like “Inventory” to “Inven” in either script names or variable names. It’s a bad habit that just makes you code more confusing over time.
Please format your code by pressing Ctrl+E or using thre preformat button in the toolbar. It makes it a lot easier for us to help you if we don’t have to retype your code. (This is why you got one line of code this time instead of a full file from me.)
As you’ve probably already realized, copying and pasting the whole error from the beginning is the way to go. Saves time.
E 0:00:00:727 Item.@implicit_ready: Trying to assign value of type ‘New_Item.gd’ to a variable of type ‘Inven_slot.gd’. Inven_slot.gd:3 @ Item.@implicit_ready() Inven_slot.gd:3 @ @implicit_ready()
Ok, so class_name is a keyword used to name an object. It seems that you have named the item script InventoySlot, and the inventory slot script Item. If you swap the names to match what the script is, that should resolve your problem.