Hi There,
I’m building a menu that allows players to select different levels and open saved levels.
When I open a level for the first time and display the Game Mode’s object, it gives me a unique object with a unique identifier. (as seen here nr 2147482452: )
When I’m saving and loading this level, everything is working fine. But when I have loaded this level for the first time, then go back to the menu and reload the same level it gives me another identifier. (as seen here:)
Because my saved game was not with this identifier, at the moment Ioad my saved game it gives me a fatal error.
This only happens after I packaged my game and play it as in the editor it gives me all the same ID numbers (0).
Is there a way to switch between levels and keep the same object URL/identifier?
You can’t rely on object IDs ever being the same, basically.
What are you trying to do? ( in general terms )
I’m trying to save and load my game without crashing.
When I open my packed game it loads the menu with a game mode called Menu. Here I can select different levels.
After clicking on one of the levels (for example level A) it opens the level with an open-level blueprint. This level has a game mode called RTS_Gamemode (see image above).
Here I’m able to play and save my level with the use of a plugin called Save Extension.
If I would then quit my game, open level A again, and load my level, it all works fine as this is the same object id as it was saved in. However, if I open the game, open level A, then go back to my menu and open level A for the second time, it gives me a new game mode URL/ID. When I then try to load the saved game I get an error saying fatal error (Unhandled Exception: EXCEPTION_STACK_OVERFLOW).
I think it’s crashing because you’re relying on IDs.
Obviously you don’t want it to crash. What I mean was, what are you trying to do generally? Something like ‘open level A from level B using a widget’. That sort of thing.
Does ‘save extension’ require you to use game mode? Does it require object IDs?
Ah, yes I’m trying to open a saved level from the menu level.
So at the start of the game, it loads a menu level that displays a menu widget.
Here you can select a saved game that opens one of the worlds that the game was saved in.
(I hope this is explaining it correctly) 
It doesn’t look like the Save Extension is using object IDs but that is something I’m still searching for in their documents. But I know that it doesn’t save the game mode.
(here is a link: Piperift - Save Extension)
Ok, terrible documentation 
Just to say, you don’t need this plugin unless you want the whole ‘world’ to save each time.
As far as I can tell from the docs, you just open the level, then call a node to ‘fix’ it like in the save game?
So I don’t think anything needs to happen with game modes, or saving IDs of actors. Just ‘open level’ followed by whatever node they use to reload the saved state of that level.
Yes, not the best documents 
Thanks for the help, I’m gonna try to figure out what else could cause the problem of the error.
1 Like