0 votes

Hi guys!

I recently re-organized my project's file, and when I try to launch my test scene, it shows me the following error message:

"error(1950,1): The class "Player" couldn't be fully loaded (script error or cyclic dependency)"

I don't really get what does it mean as I didn't modify this script (can it be due to the new position of the scene in the project?)

It prevents me from keep working on my project so if any of you know more details or how to resolve this error message that'll be a great help!

Thanks and stay safe

in Engine by (14 points)

When you changed the structure of your project and its files, how did you move around the files? Did you do it inside the editor, or with a file browser?

Hello Ertain, thanks for your reply!

I did it outside the editor... guess it might have been a mistake because I had to fix many dependencies.

I think that I found the root of the problem which is an ;

error(27,1): The identifier "Inventory" isn't a valid type (not a script or class), or couldn't be found on base "self".

Would you know something about that error?

1 Answer

0 votes

This would be a lot easier to debug, if you would provide your script.

The identifier "Inventory" isn't a valid type (not a script or class), or couldn't be found on base "self".

You're likely doing something along the lines of var test : inventory - but as there is no built-in class with that name and you haven't provided a custom class either, it's considered an invalid type to define a variable with.

The class "Player" couldn't be fully loaded (script error or cyclic dependency)

You're likely doing something like this:

Player.gd

extends Node
class_name Player

func _ready():
    if get_parent() is SomethingElse:
        pass

SomethingElse.gd

extends Node
class_name SomethingElse

func _ready():
    if get_parent() is Player:
        pass

Each script depends on the other, so when loading one you enter an endless loop of dependencies (a so-called "cyclic dependency"). Also there is this issue.

by (10,155 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.

Categories