11.01.2014, 21:49
Not sure what INI_Save is as I never use it, however when closing a file you need to specify which you're closing:
new INI:asdf = INI_Open("/Users/Awesome_Hansrutger");
INI_Close(asdf);
Not sure actually what "if(INI_Open(getINI(playerid)))", if you have that opened? What if you don't have that opened? I'm just confused here man. :P
To write in a file you need to do three things:
1. Open file.
2. Write in file.
3. Close file.
Opening:
If you wonder with the "INI:" it's like with floats: "Float:" it specifies what kind of variable it will be.
Writing, just like you wrote above:
Closing:
EDIT: My apology! I didn't know this was SII xD
new INI:asdf = INI_Open("/Users/Awesome_Hansrutger");
INI_Close(asdf);
Not sure actually what "if(INI_Open(getINI(playerid)))", if you have that opened? What if you don't have that opened? I'm just confused here man. :P
To write in a file you need to do three things:
1. Open file.
2. Write in file.
3. Close file.
Opening:
pawn Код:
new INI:file;
file = INI_Open("/Direction...");
//or
new INI:file = INI_Open("/Direction...");
Writing, just like you wrote above:
pawn Код:
INI_WriteString(file, "Name", "Awesome");
INI_WriteInt(file, "Age", 50);
INI_WriteFloat(file, "Alcohol", 3.0);
pawn Код:
INI_Close(file);