I was learning basic saving/loading for an adventure game and came across this error:
I started out simple with just saving X and Y positions with the player along with the room they're currently in.
ini_open("save.ini");
ini_write_string("Player", "Room", room);
ini_write_real("Player", "X", oPlayer.x);
ini_write_real("Player", "Y", oPlayer.y);
ini_close();
However, it throws an error as soon as I try to save.
FATAL ERROR in
action number 1
of Step Event0
for object pauseMenu:
ini_write_string argument 3 incorrect type (0) expecting a String (YYGS)
at gml_Script_ini_save (line 5) - ini_write_string("Player", "Room", room);
Is there something I'm doing wrong with saving the room, or do I have to go about it a different way?