I am creating a game that requires the use of ini files.
The game works perfectly on my computer.
When I create and executable, the executable even uses the ini files when I am programming/testing the game on the engine.
Directory where the ini files are located:
The problem occurs when a person from another computer tries to play. The game does not create any ini files.
Even placing the ini files in the zipped file that I put the game on, it gives an error. Because the ini files don't go to a directory that the game can read.
I would like to know how to make my executable create or move the ini files to a directory where the files can be read.
How do I create the ini files:
ini_open("config.ini"); arkivoIdioma=ini_read_string("jogoIdioma","arkivoIdioma",""); dadosNum=ini_read_real("dadosNum","dadosNum",1); paradaModo=ini_read_string("paradaModo","modo","automatico"); paradaPorcAutomatico=ini_read_real("paradaPorcAutomatico","porcentagem",10); paradaPorcAviso=ini_read_real("paradaPorcAviso","porcentagem",10); ini_close();
Searching about, I found something explanatory about the directory:
The ini files get created. Probably you are not looking in the right place for it. The ini file get created in %AppData%/Local/"YourGameNameHere" folder, that's where you'll find all the files you save.
BY JM DG.
Error obtained by a user:
A little earlier, I made a change to the line of this script. I will wait for this user to test again to see if the error has been resolved.