I'm having an invalid access error when I run a scrpt.

Godot Version

` 4.5

Question

Hello. I’ve been trying to make an animation node show itself while a skill is active. please node that the skill is simply a true or false bool created in a resource script. but when I run the game I get this error:
E 0:00:16:717 WoWANimation: Invalid access to property or key ‘WoWisOn’ on a base object of type ‘Resource’. willow_of_winterAnimation.gd:31 @ WoWANimation() willow_of_winterAnimation.gd:31 @ WoWANimation()

I’m trying to access the Wowison boolean variable from the resource script(Activeskills1) in the image below, from another script. The Wowison variable is the last variable in the image by the way.

The strange part of this error that I can’t figure out is that if you look at the image below, you will find that the VictusMight timer function can access variables from the same resource script without any issues. But just below the function, the WowAnimation function that I created can’t, even though the variables they use both come from the same resource script.

I’m new to Godot and programming in general, so I must be missing something.

Sorry. I’ve solved the issue. It was a problem with the resource file itself, not my code logic. I just needed to create a new resource file, and copy my codes into it.

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