Error: Object not inherited from GDScript, triing to asign to TypedArray

Hmm okay this is weird. What happens when you remove the type from the array?

I removed the type hints on both array and the error still presists

But theres no error when the resource extends CardEffect instead of EffectMove?

1 Like

Yes exactly

This similar issue suggests to clear the cache and restart the engine, because the cache might be corrupted:

So delete the .godot folder and start the engine again. Maybe do a backup of the folder, eventhough that shouldnt be neccessary. Note that this will lead to the engine having to reimport all the assets which might take a bit, depending on the number of assets

1 Like

Thanks for the idea.
Sadly it still doesn’t work.

hm okay. Inside the .godot folder is a “global_script_class_cache.cfg”-file. Open it and look for your EfffectMove-class

I came into this problem too, I removed the type definition in array( like this in your code:

@export var cards: Array[CardResource] = []

// I changed it into this
@export var cards: Array = []

and it works
hope this can help you