Author Topic: Deleting Save only under 99  (Read 248 times)

Slasher

  • slasher
    • I can help with AGS tutoring
    •  
    • I can help with scripting
    •  
    • I can help with story design
    •  
    • Slasher worked on a game that was nominated for an AGS Award!
Deleting Save only under 99
« on: 23 Mar 2017, 07:10 »
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: Adventure Game Studio
  1. function DeleteAllSaveGames() {
  2.   lb.FillSaveGameList();
  3.   int i;
  4.   while (i < lb.ItemCount) {
  5.     DeleteSaveSlot(lb.SaveGameSlots[i]);
  6.     i++;
  7.   }
  8.   }
  9.  


Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: Deleting Save only under 99
« Reply #1 on: 23 Mar 2017, 08:08 »
lb.SaveGameSlots[ i ] stores the number of save slot. So I guess you just need:
Code: Adventure Game Studio
  1. if (lb.SaveGameSlots[i] < 99)
  2.     DeleteSaveSlot(lb.SaveGameSlots[i]);
  3.