Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Radiant on Fri 20/07/2007 08:57:13

Title: Saved game issue
Post by: Radiant on Fri 20/07/2007 08:57:13
Maybe somebody has seen a similar issue before? Apparently a user is losing saved games. Does anyone know what causes this?

Quote
When I exit the game and restart it, I lose some of my saved games from the top of the list. I'm running it on XP tablet.

I saved my game and realized that it saved over the top saved game file. I checked this by clicking restore after I saved.

To double check, I hit f5, clicked the bottom saved game, retitled my save and clicked save. I hit f7 and found that the top saved game had been erased by the saved game I had just made.

It doesn't seem able to create new saved games without deleting the last saved game.

For example, before after I posted my response my top two "saves" were:
-sharp-
-coin-

I loaded -sharp-, walked outside and saved -test-.

I exited and restarted and it seemed alright. However, I exited again, saw your post, then started and the saved game -sharp- is gone, although -test- is still there.
Title: Re: Saved game issue
Post by: Gilbert on Fri 20/07/2007 12:28:28
If custom codes (ie. not default save/load interfaces) are used, it's not easy to trace this problem.
Was that your game? Maybe you can post the related save/load codes here?
Title: Re: Saved game issue
Post by: GarageGothic on Fri 20/07/2007 13:06:35
My guess, since this deals with oversaving an existing slot, is that there is some kind of confusion between actual save game indexes and the slot numbers. Make sure that you remember to FillSaveGameList after making any changes to it (including deleting games) and check that you always use SaveGameSlots property to get the proper savegame instead of just getting the SelectedIndex.
Title: Re: Saved game issue
Post by: Scorpiorus on Fri 20/07/2007 17:30:44
Yeah and also it may have something to do with timing since SaveGameSlot() is of a delayed nature; so various causes are possible.

Anyway looking at the codes would be practical.