Strange output when searching for custom class

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

I’m building a custom class for the player, with class_name being Player. Apparently everything works fine, but when I search for the node to add it to the scene, the console outputs core/script_language.cpp:244 - Condition "!global_classes.has(p_class)" is true. Returned: String(). It doesn’t interfere with anything, but I can’t help but worry if I did something wrong. If someone knows the solution, please enlighten me.

how do you “search for the node to add it to the scene” ?

The error occurs when godot tries to access “global_scripts[className]”, wich seems to be the register of custom classes. It says “i havent found the custom class in my register”.

Usually i only get this error when working with tool scripts, those can have syntax errors at runtime and then are not provided accessable for other scripts.

klaas | 2020-09-13 09:14

The problem is that I don’t get this error at compile time. I get it for every character I input in the search bar.

Galarmo | 2020-09-22 01:04

Do you still get the error after re-opening the project? I encountered the same problem yesterday - and that fixed it for me! It’s still annoying of course…

njamster | 2020-09-23 09:22

Reopening Godot 3.2.3.stable does solve the problem, then this means this is a bug, right?

godot_homie1 | 2020-11-20 16:28