Invalid call. Nonexistent function 'testing' in base 'Nil'

Godot Version

4.3

Question


There IS a resource attatched to the node that has the script that references the resource, and it woked just fine yesterday but idk what exactly i changed that made it not work. Is it an ordering issue?

This error mentioning null or nil means that something is not yet set correctly.
In your case the variable resrouce is nil.

Look into the inspector to see if you have actually set something there.
This seems fine for you.
Otherwise try to remove the resource from there and add it again.
If that doesnt work, try to reopen godot instead.

Also I would recommend changing the resource type from Resource to your own custom one. Lookup how to do that with class names.

tried all of that, still doesnt seem to work


it works now, but i cant use @export or the code simply wont recognize the resource for some reason

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.