Hello, i try to save a running level as a Resource/Scene.
My code gives the error:
E 0:00:12:0665 game.gd:56 @ QuitGame(): Can't save empty resource to path 'user://level.tscn'.
<C++-Fehler> Condition "p_resource.is_null()" is true. Returning: ERR_INVALID_PARAMETER
<C++-Quelle> core/core_bind.cpp:153 @ save()
<Stacktrace> game.gd:56 @ QuitGame()
GameMenu.gd:25 @ _on_quit_button_pressed()
Although i have the scene loaded in the variable:
LevelStallhouse:<Node2D#2393873935485>
This is my code:
ResourceSaver.save(res, save_path)
res is the node2d, so the instanced package, which gets modified in game and then i want to just say it as a tscn