'save game to slot' not working, return bool returning false = save failed?

Hey all,

I have been working on a game for a few years now, and ever since I updated to 4.23, the previously made and fully working save system is now failing.

At the start of the game I check if there’s a pre-existing save file, and if not, I create a save, and then save it to a slot. For some reason, the ‘save game to slot’ section no longer works, and the return bool to check if it worked returns false.

It is worth noting that this only works on deployed mobile devices. Testing it in engine results in the save system working as intended, making it really hard to debug.

Regardless, I tried and couldn’t fix it. I changed the save name in case there was a corrupted save file on my device, nothing. I deployed and installed it through google play and directly installed through USB and neither worked. I tested on multiple android devices and got nothing. From ‘create save game object’ I casted to my save just in case, didn’t work. I tested a windows build and that didn’t work either. I tried looking up this issue on both the forums and answerhub, and the unreal documentation and couldn’t find anything that fixed this issue.

I am at my wits end here. Anyone able to help?

Thanks in advance,

after doing some more testing, I learned that the windows test build in fact has the save system working. So the problem is only on mobile

I will test it, but I did a test android build on a new project and saved the blueprint ‘testsave’ to the name ‘testsaveslot’ and it worked fine

Honestly, I’ve had so many mobile issues since attempting creating games on 4.23. I still use 4.22.

If I can recall properly, your save game slot needs to be the same name as the save game object. If you need multiple saves, use the slot integer.

I just did a test with the slot names being identical to the actual bp save object asset name and it still did not work!

What version of ue4 are you using?

I’m using the most recent version, 4.23

Well I can’t back version now so… I guess I wait and hope 4.24 fixes it

Remove the save to slot when you load the game. When you cast to the save game object to load it, get the variable current level and set it to a locally set variable for reference.

Well I’m going to have to save eventually, you pick up loot in the first level so saving will be required before I load the next level. Let me try doing the first save at the end of the level instead of the start and see if that fixes it.

Okay, take a look at the way I load/save a game. The first custom event I create is Load Game. I use this to determine if we have a saved game and if not we create a default save game with default variables and once again, load the save game and set the variable locally on my Game Instance (Struct named Statistics that I created separately). My save game is called SG_Statistics and you will notice that I utilize that name as the slot name.

I was able to push the save to slot to later in the first level and I still got the issue

I was also able to confirm that ‘create save’ is not the issue, it creates a valid save object. It is the ‘save game to slot’ node that is returning false.

You changed the slot name to ArcusSaveState? Give me your updated BP.

Here is where the save fails, now moved later on in the first level instead of on begin play. I have isolated the issue to this node. The branch will always return false

I’m not near ue4 at the moment but if you could upload your project and PM me the link I will help resolve this issue and determine if it’s a bug or not.

Ok. Is a pretty big project, fair warning

How many gbs?

sent you a dm!

I’m near my desktop now, check your dms