Reading save game name into variable (SOLVED)

Started by WHAM, Sun 06/02/2011 18:28:00

Previous topic - Next topic

WHAM

I am making a custon same/load GUI, in which I represent each saved game with a symbol.

My goal: when the save/load GUI is loaded, the game checks either the name of the saved game, or a variable in the saved game file, and then shows a corresponding symbol from a list. Say, the player has completed 50% of the game and saved into slot 2. When the save/load GUI is loaded up, the game checks the name of the save in slot 2, finds that it has been automatically named as "2_50" and then shows the player a symbol that represent a 49-50% game completion.

Main question, therefore, is:

When a game is saved with the SaveGameSlot() command, it is given a name. How do I read said name into a string variable?

OR

If this is possible: how can I read a single variable from a saved game? Lets say that there is a global variable in the game called "int savecompletion". The game records the players progress in percentage into this variable. When the player opens the Save/load GUI, is there a way to read this variable from a saved game slot and show it to the player?

If yes, how?

Wrongthinker and anticitizen one. Utterly untrustworthy. Pending removal to memory hole.

Calin Leafshade

String s = GetSaveGameDescription(slot);

I think thats right.. it's something like that.

WHAM

Aww heck! For some reason I missed that one in the manual...

Well this should simplify things greatly! Thanks Calin!
Wrongthinker and anticitizen one. Utterly untrustworthy. Pending removal to memory hole.

SMF spam blocked by CleanTalk