• Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!

GMS 2.3+ INI saved outside of AppData when saving to directory

Liam Jacobs

Hi all,

I'm currently working on the server-side part of a registration system.
I save user's profiles as an INI, and then load and read that data on the server when logging in.

The system works fine, and saves the file in the expected location in Local AppData if I open the ini using:
ini_open(string_lower(clientUsername) + ".usr");
However, the server is going to be reading a lot of files, and I'd like to keep everything organized inside of different directories.
So I disabled the Sandbox, and tried using:
ini_open("/Users/" + string_lower(clientUsername) + ".usr");
For some reason, this results in the INI being created in "V:\Users\name.ini" instead of AppData.

I've tried using:
ini_open(working_directory + "Users/" + string_lower(clientUsername) + ".usr");
With no luck.

Is there any way that I can get the INIs to save into a specific folder in Local AppData, without having to hard-code the path into the server software?

Thanks in advance,
L. Jacobs