Save game slots error

Started by Slasher, Sat 18/12/2021 15:53:15

Previous topic - Next topic

Slasher

Hi,

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

Cheers

arj0n

#1
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?

Slasher

#2
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)

arj0n

So when a case is finished you can just delete all exisiting saves and inform the player that all previously save games are deleted?

Slasher

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

Cassiebsg

That sounds evil!  8-0
I would be pissed if the game deleted my saves.  :-\
There are those who believe that life here began out there...

Slasher

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..

arj0n

#7
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.

Slasher

#8
I just need a warning to say when slots all full and to delete some..

Oh, here is the error message:

Slasher

#9
This seems to do the trick....

Code: ags

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();

}



Cassiebsg

Good solution, that way the player decides which saves to delete.  (nod)
There are those who believe that life here began out there...

Crimson Wizard

#11
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....

SMF spam blocked by CleanTalk