Saving randomly freezes the game

I have made a Savegame Object:

6a23ff54c1.png

When the game starts I do the following check:

When the player dies, this happens:

2af30ff3d0fa67986a974f66e911aba8fe780ce9.jpeg



e968348f96.jpg

Though some times when I die, the game just freezes and the only way to play again is to restart the game. There is no pattern. The only way to solve the issue is to delete the save file that I created called “mysave.sav”, but that deletes all of the save data I put in there defeating the purpose of having the save file in the first place. Does anyone know what could be the issue here?

It’s hard to say with out having the files to play with but it seems like you might be handling save data poorly.

For example when the game starts you create a saved game object yet you don’t store it in a variable to access later. Because of this you need to keep loading the saved game object every time you need to access the data. Over time this will cause multiple saved game objects to be loaded which could cause performance issues.

Another thing I noticed is you have a branch where theirs a change it could false with nothing happening which would cause your game logic to stop.

Hopefully this helps, also below are a few screenshot of how I tend to handle my saved data.

Yeah my saving system is quick and dirty. Never saved data with Blueprints before. I had planned to remake it later as the system I currently got is just for a pre-alpha build and serves it’s purpose well. I will take note of your pictures.

However you pointed out that False branch I didn’t complete and actually plugging that out as it should be seems to have solved the issue.