Global Variable not found

I have a global script for saving and loading. When I try to use the variables from the global script, it gives out an error.

Cannot find member " " in base " "

I followed the Godot 4 Global Variables youtube tutorial but I still get this error.
I already put script in the globals but it doesn’t seem to register it.

Can anyone please help?

Hmm, I haven’t tested this out, but perhaps the issue is that you’re global script is also a class name.

Maybe try getting rid of the class name.

I tried commenting the class_name and now it has an error:

Identifier “SaveManagerMD” not declared in the current scope

Is the error on one of the two scripts you show at the top?

Just noticed that your save manager in the globals script dialog has a lowercase ‘d’ and you’re using and uppercase ‘D’

Just a thought…

Ryn

3 Likes

Holy crap, you’re right. It works now. Thank you

1 Like

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