Deleting Save only under 99

Started by Slasher, Thu 23/03/2017 07:10:50

Previous topic - Next topic

Slasher

Hi

After completing the game it restores a save slot point (120) to start again...

What i want is to delete only save slots in the list box (under 99) when the game restores save slot 120.

Usually:

Code: ags

function DeleteAllSaveGames() {
  lb.FillSaveGameList(); 
  int i;
  while (i < lb.ItemCount) {
    DeleteSaveSlot(lb.SaveGameSlots[i]);
    i++;
  }
  }



Crimson Wizard

lb.SaveGameSlots[ i ] stores the number of save slot. So I guess you just need:
Code: ags

if (lb.SaveGameSlots[i] < 99)
    DeleteSaveSlot(lb.SaveGameSlots[i]);

SMF spam blocked by CleanTalk