Savegame failed to cast

Hi, I been working with Savegame for a long time and experience no problem until recently something weird keeps happening. The Savegame when cast to always return failed and this happened together with a few other Savegame files after a game is restarted or exited. It feels like they are corrupted somehow and it broke the game. I have to delete all the save files in order for the game to return normal.

The Savegame exists but failed to cast. Anyone knows what is this?

Updated - I replaced the save files from the editor to the packaged saved folder and there is no cast to fail anymore. So does it means the save files got corrupted?

thanks UE 4.27

If you start using a different type of save game BP, but still have the old save game file on the hard drive, it will not cast. Just because it’s the old type of BP sitting on the HDD.

It’s not that issue. For some unknown reasons, the sav file is corrupted. If I create a new save game object to replace it, then it casted correctly. I have the corrupted sav file and tested it so there’s definitely something wrong with that file itself.

I can get the values in the corrupted sav but it seems everything is reset to default and also unable to change the value in it, the return node for saving to slot returns to fail. But if i create a new save, then it works again with no fails.

1 Like

Also, if you change the names or types of variables, it can screw things up. Could it be that?

1 Like

I don’t think I changed anything, it is just regular saving that I do for all the levels but for this final level, it just broke it whenever the level is restarted or continued from the menu.

I saved all the progresses in a array, for example if a door is opened, ‘door01’ string is added to this string array and then this array is used to check if the door is already opened. Perhaps this method is a bad approach to saving which caused the corruption?

Right now the only solution I have is to make a backup save that saves constantly in checkpoints. So if the cast to save failed, I will create a new save and replaced the values from the backup. But in future if the backup save is also somehow being corrupted, then it is real problematic.

1 Like

I don’t think it’s getting corrupted. You should be able to save strings in an array, no problem.

Update: I think I misunderstood your reply, glad to know that saving in array is okay.

I am calling it corruption because I am not sure if this is even a bug that is fixable yet.

1 Like