Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Slasher on Sat 18/12/2021 15:53:15

Title: Save game slots error
Post by: Slasher on Sat 18/12/2021 15:53:15
Hi,

What would be the best way to Warn of game save slots full and to delete saves etc?

Cheers
Title: Re: Save game slots error
Post by: arj0n on Sat 18/12/2021 19:48:03
Given the player wants to save the game
Note the player that all save slots are currently used
And note that one of the occupied save slot needs to be selected in order to save the current game and therefor overwrite the selected save slot?
Title: Re: Save game slots error
Post by: Slasher on Sun 19/12/2021 03:33:22
Quote from: arj0n on Sat 18/12/2021 19:48:03
Given the player wants to save the game
Note the player that all save slots are currently used
And note that one of the occupied save slot needs to be selected in order to save the current game and therefor overwrite the selected save slot?
OK...Game has 6 cases... as each case is completed I would like all Saves to be deleted and empty for next case....

AGS Editor .NET (Build 3.5.1.10)
Title: Re: Save game slots error
Post by: arj0n on Sun 19/12/2021 12:14:25
So when a case is finished you can just delete all exisiting saves and inform the player that all previously save games are deleted?
Title: Re: Save game slots error
Post by: Slasher on Sun 19/12/2021 12:45:02
Quote from: arj0n on Sun 19/12/2021 12:14:25
So when a case is finished you can just delete all exisiting saves and inform the player that all previously save games are deleted?

Something like that...

Cheers
Title: Re: Save game slots error
Post by: Cassiebsg on Sun 19/12/2021 13:57:35
That sounds evil!  8-0
I would be pissed if the game deleted my saves.  :-\
Title: Re: Save game slots error
Post by: Slasher on Sun 19/12/2021 14:34:34
Quote from: Cassiebsg on Sun 19/12/2021 13:57:35
That sounds evil!  8-0
I would be pissed if the game deleted my saves.  :-\

off course could be warned your game slots are full up.....and to manually delete..
Title: Re: Save game slots error
Post by: arj0n on Sun 19/12/2021 14:41:51
If you just reserve a certain set of slots per case, or (probably even better) keep track of what save belongs to which case, you don't need to delete existing saves game files.
When the load/restore screen is loaded just ask first for what case the player wants to load a savegame (for example by using a listbox), then filter the shown saves games for that chosen case.
Title: Re: Save game slots error
Post by: Slasher on Sun 19/12/2021 16:37:45
I just need a warning to say when slots all full and to delete some..

Oh, here is the error message:
(https://i.imgur.com/Tx5c6Fg.png)
Title: Re: Save game slots error
Post by: Slasher on Mon 20/12/2021 16:59:28
This seems to do the trick....

Code (ags) Select

function btnSaveGame_OnClick(GUIControl *control, MouseButton button)
{
  int gameSlotToSaveInto = find_save_slot(txtNewSaveName.Text);
if (gameSlotToSaveInto > 50){
  Display("You have exceeded maximum games saves. Please delete some saved game saves.");
  return;

 
else if (gameSlotToSaveInto <0)
return;

  SaveGameSlot(gameSlotToSaveInto, txtNewSaveName.Text);
  close_save_game_dialog();

}


Title: Re: Save game slots error
Post by: Cassiebsg on Tue 21/12/2021 14:53:42
Good solution, that way the player decides which saves to delete.  (nod)
Title: Re: Save game slots error
Post by: Crimson Wizard on Tue 21/12/2021 18:31:34
So, this is a side note, but I've been looking into the crash Slasher mentioned few posts above, and it turned out that TextBox crashes the engine if there's empty string and you press Backspace again (when there's nothing to delete).

There has to be another patch made for 3.5.1....