• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM saving multiple variables to disk?

U

Uberpink

Guest
google abit but something is confusing,, cant multiple variables be stored in ONE ini file?`

found out that the built in "save game" function returns errors especially between different versions of the game, so i want to store all global variables in one go, with their present values (and load them when i "load the game").... is it possible?

like this:

eksample, creating the file...

ini_open("variables.sav");
ini_write_real("Save1","somestuff",global.lives);
ini_close();

but is THIS possible?

ini_open("variables.sav");
ini_write_real("Save1","somestuff",global.lives);
ini_write_real("Save1","somestuff",global.pickups);
ini_write_real("Save1","somestuff",global.enemydrops);
ini_write_real("Save1","somestuff",global.spawnrate);
ini_write_real("Save1","somestuff",global.something);
ini_close();

its only variables i need to save, this savestuff is all new to me, or is this better by using a "ds_list"?
 
Last edited by a moderator:
U

Uberpink

Guest
nope have never seen that page, looked at some almost similar page inside gamemakers help doc, but the one u posted was abit easier to understand with the better description pics:)
 
Top