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

.ini Files Save Directory

F

FisherCS

Guest
Hello there. I have a question.

Is it possible to save .ini files to another directory besides working_directory?
I'm using the code below but it's not working. No directory has been created on my Desktop.
Code:
ini_open("C:\Users\Public\Desktop\example.ini");
ini_write_real("example","example",0);
ini_close();
Thanks. :)
 

TsukaYuriko

☄️
Forum Staff
Moderator
Use get_open_filename or get_save_filename to ask the user for a file name. Doing so voids the sandboxing for that particular file name until the game is closed. Apart from that, there is no way of doing this without using an extension instead of the default file I/O.
 
F

FisherCS

Guest
Use get_open_filename or get_save_filename to ask the user for a file name. Doing so voids the sandboxing for that particular file name until the game is closed. Apart from that, there is no way of doing this without using an extension instead of the default file I/O.
Awesome! It works. Thanks. :)

You actually get to choose between all the valid sandbox locations on platforms that supports more than one, by the way.
View attachment 728
Thank you. I just read "File System Limits" on Documentation. We can't save and load outside the Sandbox. :(
 
Top