#OnButtonPress error. Suddenly can no longer load/open scene.

1 messages · Page 1 of 1 (latest)

real totem
#

I don't even know where to begin with this.
So very simply i have a MainMenu scene with a PlayButton, which is hooked up to a pressed() signal. Upon clicking that button it should send me to the LevelPicker scene.

This was absolutely all functioning before, no issues at all. Then after going back after my feature iteration was done I wanted to clean up Debugger errors before continuing with the project. I got to this different error regarding accessing a node so I was looking up different ways to solve it. One of the ways was to move the overlay that it was about in a ready function in the levelpicker script so I did. saved the scenes.

Long story short now the Play button in the Main menu is not working and its prompting two new errors.
E 0:00:01:910 main_menu.gd:18 @ _on_play_button_pressed(): Cannot open file 'res://scenes/levels/level_picker.tscn'. <C++ Error> Condition "err != OK" is true. Returning: Ref<Resource>() <C++ Source> scene/resources/resource_format_text.cpp:1388 @ load() <Stack Trace> main_menu.gd:18 @ _on_play_button_pressed()
E 0:00:01:910 main_menu.gd:18 @ _on_play_button_pressed(): Failed loading resource: res://scenes/levels/level_picker.tscn. Make sure resources have been imported by opening the project in the editor at least once. <C++ Error> Condition "found" is true. Returning: Ref<Resource>() <C++ Source> core/io/resource_loader.cpp:343 @ _load() <Stack Trace> main_menu.gd:18 @ _on_play_button_pressed()

So naturally I reverted my levelpicker script back to it's original working state, saved, and yet despite theoretically not one line of code is different anywhere at all; it still prompting those errors above and the Play button is not working.

#
  • I saved all scenes,
  • I reloaded the project twice.
  • I even disconnected and reconnected the Main menu play button signal just in case and nope, nothing.

This has basically grinded my project progression to a complete halt because I'm really not understanding how it was working absolutely perfectly originally for a day or two, then upon one ready function added briefly to the levelpicker script it has broken something despite even very simply going back to identically what i had before removing said ready function & related changes.