All Questions



Room class cannot be fully loaded

Hello, I am running into a bit of an issue where Room cannot be fully loaded because of scripting error or cyclic dependency. I've copied all the scripts just to make sure it wasn't an issue between keyboard and chair.

There is also a minor issue with the main block of instructions for Room. It says BasicDungeonUtils instead of Utils. This gets clarified through the discussion of how the script works, but still thought I should bring it to your attention.

var offset := BasicDungeonUtils.index_to_xy(rect.size.x, _iter_index)

Thank you

  • H
    HobbyistDev replied

    So, it turns out that I didn't completely purge of all of the stuff we added to the other scripts

    I am still getting the error, but I am able to run the generator. Not sure why I am getting the error still. I have gone through every line comparing it to the demo and it's essentially the same (except it uses the full BasicDungeon with the class_names).

  • GDQuestions replied

    When you see this kind of error but can't find the cause, you want to restart Godot.

    First this error exists in Godot 3 when two GDScript files load or reference one another - the GDScript compiler doesn't support that so it creates an endless reading cycle and the compiler just stops.

    In Godot 4 it's supposed to get fixed with GDScript 2, but until then we have to work with it.

    I can't tell you why it happens with your project. If next time you open the project in Godot it doesn't appear, then that was a caching issue. If it keeps coming back, then either it's likely the two scripts referencing each other. Otherwise, I'm not sure.

    If you try restarting and it comes back, I can look into it for you. I'd just need you to upload your project as a ZIP archive to a site like Google drive and post the download link here.


    Note your current display name looks like your email address. In case you'd like to change it, you can do so here:

  • H
    HobbyistDev replied

    o.O I didn't even notice that. Thanks for the heads up.

    As for the error, it seems to have cleared once I checked it again. I was rather worried for a bit, but I guess that's something we will have to deal with for the time being. Thank you very much.

  • GDQuestions replied

    I see, so it was a caching issue. This happens. In those cases, you just have to reload the editor (go back to project selection screen and reopen the project).

    We all can't wait for the issue to be fixed. Fingers crossed for Godot 4!