Godot version:
3.1 official
OS/device including version:
Windows 7 PC
Issue description:
Whenever i use globals and give them a class_name, i cannot access their non-static methods via script, because the script thinks i want to access a class instead of a global, although i have autoload on. But it can be "solved" in two ways:
I guess this happens only, if the class_name and the script-name are identical.
As i know this now, for me personally this is not too big of an issue, but for newcomers this could put them in front of a problem, that could be deterring them from using godot any further, as its not a direclty "logical" error, if you dont know its cause.
Steps to reproduce:
solve by:
Minimal reproduction project:
Reproduction_Project.zip
It should likely raise an error when class_name and the AutoLoad global name conflict. There's no practical reason for using class_name in an AutoLoad (at least not with the same name), so we should just forbid it.
Most helpful comment
It should likely raise an error when
class_nameand the AutoLoad global name conflict. There's no practical reason for usingclass_namein an AutoLoad (at least not with the same name), so we should just forbid it.