Updated version?
nice
And for people wondering about joining it to a TStaticVar
First you put the code Inverness posted in a class and name it something like, "file_ini" or something.
Then you do something like this serverside, for example in a dbnpc or a wnpc.
PHP Code:
function onCreated() {
this.ini = new TStaticVar("TIniFile");
this.ini.join("file_ini");
}
Then you can do from anywhere serverside something like
PHP Code:
function onCreated() {
temp.ini = new TIniFile();
temp.ini.load("path/to/filename.ext");
echo(temp.ini.section.var);
}
This makes it so you don't have to join "file_ini" everytime you need to load a ini file, as you can use TIniFile, as that object will have "file_ini" pre-joined.
I think Inverness can explain it better though, but I tried