[Godot 4.1] "Parser Error: Identifier Not Found..." for every variable in extended class since upgrading

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By CFR_Godot

Hi everyone!

I’m having a serious issue with my project since upgrading to Godot 4.1 - my project worked fine in Godot 4.0.3 but since this upgrade my project instantly crashes when I try to test it, with the error “Parser Error: Identifier not found: [variable name here]”.

Commenting out the now offending variables reveals it has this complaint about pretty much every variable in the class, e.g. “ActorActive”, “ActorAlive”, etc., and as even the script parser finds no problem with the scripts in question I’m at a loss as to what’s going on or how this happened.

I have a base class called “Actor_Base” that extends from CharacterBody3D, which has two classes extending from that called “Actor_Simple_Base” and “Actor_Player_NPC”, which is where the parser gets to before crashing.

I don’t know if the syntax has changed somewhere or if anyone else has experienced this?

To reiterate, the project worked completely fine in Godot 4.0.3, but since 4.1 it fails to test the game and complains about every variable. Edit: It’s broken in Godot 4.0.3 as well now and I am sad lol

If you can reproduce the problem in an example project, its better to report this to the devs on Github.

If you say it’s broken in 4.0.3 too now, is that because you reopened the project in 4.0 after having opened it in 4.1? I dont think that’s supported (you should make a backup or use VCS), 4.1 probably broke something in your project files.

Looks like someone posted a similar error: Unexpected "Parser Error : Identifier not found" when using parent class member · Issue #78146 · godotengine/godot · GitHub

Zylann | 2023-07-07 10:16