# Savegame loads fine, can't save over it, can't delete it

**URL:** <https://forums.unrealengine.com/t/savegame-loads-fine-cant-save-over-it-cant-delete-it/453203>\
**Category:** Editor Scripting\
**Tags:** savegame, dedicated-server, unreal-engine, UE4, question, Blueprint\
**Created:** [August 1, 2019, 6:43pm UTC](https://forums.unrealengine.com/t/savegame-loads-fine-cant-save-over-it-cant-delete-it/453203 "2019-08-01T18:43:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chumble](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chumble](https://forums.unrealengine.com/u/Chumble)\
**Post date:** [August 1, 2019, 6:43pm UTC](https://forums.unrealengine.com/t/savegame-loads-fine-cant-save-over-it-cant-delete-it/453203/1 "2019-08-01T18:43:59Z")

</div>

I am using a multiplayer setup with a dedicated server. I have a savegame object that is used ONLY by my server to save the state of the game so information will persist between plays. The savegame object contains a struct.

This works fine for a while. I am able to load from the savegame and overwrite it when I am done. However, after [something] (I’m not sure what the conditions are for this), I am no longer able to overwrite the savegame. I can still load from it fine and the struct seems intact. But when I execute a “Save Game in Slot”, it returns false.

I don’t know why it might fail to save the game so I tried calling “Delete Game in Slot” first … but that returns false too! So I can’t save to this file and I can’t delete it. The only “workaround” I’ve come up with is to manually navigate to the file in Windows Explorer and delete it. Then “Save Game in Slot” will work again but I’ve lost all my old data.

I need these saves to be reliable and I have no real way of debugging this. How can I handle this situation?

---

<div class="post-metadata">

**Author:** ![xyah1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@xyah1](https://forums.unrealengine.com/u/xyah1)\
**Post date:** [August 2, 2019, 2:14pm UTC](https://forums.unrealengine.com/t/savegame-loads-fine-cant-save-over-it-cant-delete-it/453203/2 "2019-08-02T14:14:00Z")

</div>

Can you provide some screenshots on how you go on about this?

---

<div class="post-metadata">

**Author:** ![Chumble](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chumble](https://forums.unrealengine.com/u/Chumble)\
**Post date:** [August 2, 2019, 2:31pm UTC](https://forums.unrealengine.com/t/savegame-loads-fine-cant-save-over-it-cant-delete-it/453203/3 "2019-08-02T14:31:07Z")

</div>

Sure. All of this is in my game mode

On begin play, load the save:

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/c/6/ac66a963c056a5b5e8b44b70c6de287c8d8e5bec.png)

This always works fine.

This part looks a little messy, I crammed the stuff together for the sake of the screenshot:

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/7/e/87ed6c092fa08def663dcdad04b6f2bb9b12574c.png)

The events “AddAbility” and “DestroyAbility” are called from other blueprints. Both modify the “Abilities” array and call “Save Ability List”.

That section off of the False in the branch node there was my attempt at deleting/re-saving the savegame if it fails to work for some reason but that never worked. It always prints “Failed to delete save game” and “Does slot exist? True”.

But I want to reiterate, that “Save Game to Slot” doesn’t _always_ fail. I’m not sure under what conditions this suddenly starts failing, it has happened without me having made any changes to Abilities or the SaveGame object. I thought it might be related to using the same SaveGame both in Play in Editor and by running the dedicated server VIA command line outside the editor but it’s just a guess.

I’m starting to think that maybe SaveGame objects are not what I should be using for this kind of data. But also … if _this_ SaveGame object has issues sporadically, won’t my player SaveGame objects also have issues? I’d like to find a root cause. Ok I’m rambling too much.

---

<div class="post-metadata">

**Author:** ![RexReality](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RexReality](https://forums.unrealengine.com/u/RexReality)\
**Post date:** [May 31, 2023, 9:00am UTC](https://forums.unrealengine.com/t/savegame-loads-fine-cant-save-over-it-cant-delete-it/453203/5 "2023-05-31T09:00:00Z")

</div>

I thought it needed to be a Game Instance instead of a Game Mode
