21.01.2012, 20:29
Hi guys,
I can't get an integer to save to an ini file when a player disconnects. The value of the field in the file I'm trying to edit simply won't change.
with CurrentFile being a string:
I tested whether PLAYER_REGISTERED was holding the right value, and it appeared to be the case. So I can only think of something going wrong in the opening file/writing part. Don't know what, though.
The funny thing is that when a player connects, it actually does write a value...
I would appreciate it if you could help me out here!
Thanks!
I can't get an integer to save to an ini file when a player disconnects. The value of the field in the file I'm trying to edit simply won't change.
pawn Код:
dini_IntSet(CurrentFile,"Registered",gPlayerInformation[playerid][PLAYER_REGISTERED]);
pawn Код:
format(CurrentFile,sizeof(file),PlayerFile,gPlayerInfo[playerid][PLAYER_NAME]); // PlayerFile: #define PlayerFile "Administration/Users/%s.ini"
The funny thing is that when a player connects, it actually does write a value...
pawn Код:
dini_IntSet(file,"Registered",-1);
Thanks!