If I seem a touch panicked, I am, I have obligations to fill for other people and this is terrifying me.
I’ve got a game that works perfectly fine in the editor but once exported it won’t load the main game scene. I can’t BEGIN to imagine what the problem is after consulting google and a ton of different threads (none of which seem to have the exact problem I do)
Whatever extra information is necessary, I’d be happy to give it. A lot of the code isn’t mine (the original programmer left us kind of high and dry) so I’m left without even a hint of how to move forward.
ERROR: Condition "err" is true. Returned: err
at: load_source_code (modules/gdscript/gdscript.cpp:807)
ERROR: Cannot load source code from file 'res://scenes/ui/BetterScrollBox.gd'.
at: (modules/gdscript/gdscript.cpp:2209)
ERROR: Failed loading resource: res://scenes/ui/BetterScrollBox.gd. Make sure resources have been imported by opening the project in the editor at least once.
at: (core/io/resource_loader.cpp:270)
ERROR: res://Scenes/UI/BetterScrollBox.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://scenes/ui/BetterScrollBox.gd
at: poll (scene/resources/resource_format_text.cpp:412)
ERROR: Failed to load resource 'res://Scenes/UI/BetterScrollBox.tscn'.
at: (core/io/resource_loader.cpp:206)
ERROR: Failed loading resource: res://Scenes/UI/BetterScrollBox.tscn. Make sure resources have been imported by opening the project in the editor at least once.
at: (core/io/resource_loader.cpp:270)
ERROR: res://Scenes/Combat/Combat.tscn:4 - Parse Error: [ext_resource] referenced nonexistent resource at: res://Scenes/UI/BetterScrollBox.tscn
at: poll (scene/resources/resource_format_text.cpp:412)
ERROR: Failed to load resource 'res://Scenes/Combat/Combat.tscn'.
at: (core/io/resource_loader.cpp:206)
ERROR: Failed loading resource: res://Scenes/Combat/Combat.tscn. Make sure resources have been imported by opening the project in the editor at least once.
at: (core/io/resource_loader.cpp:270)
ERROR: res://Scenes/Game.tscn:14 - Parse Error: [ext_resource] referenced nonexistent resource at: res://Scenes/Combat/Combat.tscn
at: poll (scene/resources/resource_format_text.cpp:412)
ERROR: Failed to load resource 'res://Scenes/Game.tscn'.
at: (core/io/resource_loader.cpp:206)
ERROR: Failed loading resource: res://Scenes/Game.tscn. Make sure resources have been imported by opening the project in the editor at least once.
at: (core/io/resource_loader.cpp:270)
Well, those might be relevant! Is that all of the errors you posted there? If so, it looks like the problem is with BetterScrollBox.gd - if you look through the errors, all the ones after that are a chain of “I couldn’t compile X because Y is missing, and Y is missing because I couldn’t compile it because Z is missing”, that leads back to that one script.
So, two things I would check if it were me:
Are there any errors in that script?
Are the export settings set up to exclude anything, and if so, does it exclude that script?
The script is fine, no errors show up (especially since it seems to be working fine in the editor) and there’s nothing that would exclude the BetterScrollBox.gd script, though it occurs to me that ‘res://scenes/ui/BetterScrollBox.gd’ is attempting to reference the folder, which has scenes as “Scenes” and ui as “UI”
Is there a chance it’s case-sensitive in the export but not in the editor?
My first thought is if the .pck file is missing in wherever you included the .exe, but I have only exported basic games thus far, so I’m unsure if that was checked.
Yes! If you are working on windows, it will not be case sensitive in the editor (because windows file paths are not case sensitive), but iirc it will be when exported.