number GetSaveFiles(string gameName, strings descBuffer, @number descSlots[])

Retreives the total number of save files and their descriptions. The descriptions of the saved games are stored in the descBuffer. The slot numbers of the saved game strings' saved games are stored in the descSlots array.

It returns the number of saved games. On error, it returns -1.

(var totalGames, descBuffer[200], descSlots[20], i)

= totalGames GetSaveFiles("LSL3" @descBuffer @descSlots)
if(== totalGames -1)
    Print("Error getting the save files!")
    (for (= i 0) (< i totalGames) (++i)
        FormatPrint("Slot #%d, name: %s" descSlots[i] @descBuffer[* i 18])

See Also: SaveGame, RestoreGame