SOLVED ini files not working

K00lman

Member
I was trying to make a save system for my clicker game using some ini files, and put in this code:
GML:
ini_open("data.ini");
global.code_lines = ini_read_real("stats", "code_lines", 0);
global.programs = ini_read_real("stats", "programs", 0);
global.money = ini_read_real("stats", "money", 0);
global.total_lines = ini_read_real("stats", "total_lines", 0);
global.total_programs = ini_read_real("stats", "total_programs", 0);
global.total_money = ini_read_real("stats", "total_money", 0);
ini_close();
GML:
ini_open("data.ini");
ini_write_real("stats", "code_lines", global.code_lines);
ini_write_real("stats", "programs", global.programs);
ini_write_real("stats", "money", global.money);
ini_write_real("stats", "total_lines", global.total_lines);
ini_write_real("stats", "total_programs", global.total_programs);
ini_write_real("stats", "total_money", global.total_money);
ini_close()
I have the first section work on startup and the second secontion on each step, but not matter what I do, whenever I open the game up again it does not save any of the varibles. What am I doing wrong?
 

TsukaYuriko

🌠
Forum Staff
Moderator
For reference, the file will be in the local storage specified in the game options - either %LOCALAPPDATA%\<game name>\ or %APPDATA%\<game name>\ on Windows.
 

K00lman

Member
For reference, the file will be in the local storage specified in the game options - either %LOCALAPPDATA%\<game name>\ or %APPDATA%\<game name>\ on Windows.
I can't find a folder with my game's name in any of the AppData folders, and my games files that are in the gamemaker subfolders did not have any ini files that I could find.
 
Top