First time poster so please let me know if I am doing anything wrong.
I cant seem to access the script attached to my scene when instancing it.
I am getting the error message: "Invalid set index of 'id' (on base 'Sprite') with value type 'int'.
This is a function that I call in the ready function of my main project:
> func spawn_structure(struct, pos, rot, item):
> var new_structure = load(struct.scene).instance()
> new_structure.id = 1
a struct is a custom class that stores id, scene, among other things
the print statements print as follows ->
"res://prefabs/stand.tscn" and "[Sprite:1298]"
So I know the scene is instanced properly.
I have attached an image of the stand.tscn scene and the script that is attached to it.
I'm sure this is something and easily fixed but I can't seem to figure it out and would very much appreciate any help