• 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!

GameMaker Questions about ini files

D

Dylaniza

Guest
Hi! Just getting back into game maker Learning GML instead of drag and drop and enjoying it much more. I made a simple high score system using Shaun Spalding's tutorial on saving and loading ini files. The high score is being displayed and is working fine but when I search for the file I can't seem to find it. I am using a MacBook since my pc is having problems and searching for files seems to be harder on this. Any ideas how to find it?

Also why is it called ini files when the file extension is .sav in most cases I've seen?
Sorry for how messily I wrote this post, I'm a bit tired. thanks.
 

NightFrost

Member
Not sure where Mac saves by default, but they are called ini files because regardless of file extension, when you open the file as ini the contents are expected to be in ini file format and written / retrieved in that manner.
 
D

Dylaniza

Guest
Not sure where Mac saves by default, but they are called ini files because regardless of file extension, when you open the file as ini the contents are expected to be in ini file format and written / retrieved in that manner.
Thanks for the reply, was wondering this since when I was searching about ini files most websites say that .INI files are a windows only file. I'm guessing that .sav files can be open on most platforms. Thanks again :)
 
D

Dylaniza

Guest
Hi, I wasn't sure if I should make a new topic but this problem falls under the same category so decided I should just add on to this thread.
I just began working on a new game and set the file name to save the ini file as 'save.sav' but I believe it is reading the same file as in my past game as the high score is the same. I thought that they would have there own folder for each games data but I guess not. Should I just give the file a unique name or is there a way to make sure they stay separated and other peoples games who may use 'save.sav' won't overwrite my games data.
Heres the code if it helps.
Code:
//Room Start Event
ini_open("Save.sav");
global.HighScore = ini_read_real("Save1","highscore",0);
ini_close();
Thanks.
 
Top