Y_ini Not Saving On Disconnect! -
Anak - 24.06.2013
hello guys there is a problem that account is not saving on disconnect i have this under onplayerdisconnect:
pawn Код:
new INI:file = INI_Open(Path(playerid));
INI_SetTag(file,"Player's Data");
INI_WriteInt(file,"AdminLevel",pInfo[playerid][Adminlevel]);
INI_WriteInt(file,"VIPLevel",pInfo[playerid][VIPlevel]);
INI_WriteInt(file,"Money",GetPlayerMoney(playerid));
INI_WriteInt(file,"Scores",GetPlayerScore(playerid));
INI_WriteInt(file,"Kills",pInfo[playerid][Kills]);
INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]);
INI_WriteInt(file,"Adisable",pInfo[playerid][Adisable]);
INI_Close(file);
Re: Y_ini Not Saving On Disconnect! -
iJumbo - 24.06.2013
Maybe the ' in your filename give out some problem, im not pratic with y_ini but try out
Re: Y_ini Not Saving On Disconnect! -
dEcooR - 24.06.2013
INI_SetTag(file,"Player's Data"); //
make sure you have defined this same at all
and show you path stock dude
Re: Y_ini Not Saving On Disconnect! -
Anak - 24.06.2013
i have defined it
This is stock
pawn Код:
stock Path(playerid)
{
new str[128],name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(str,sizeof(str),UserPath,name);
return str;
}
Re: Y_ini Not Saving On Disconnect! -
CaRa - 24.06.2013
Show us register file, how you register the data in file.
Re: Y_ini Not Saving On Disconnect! -
Anak - 24.06.2013
dis:
pawn Код:
new hashpass[129];
WP_Hash(hashpass,sizeof(hashpass),inputtext);
new INI:file = INI_Open(Path(playerid));
INI_SetTag(file,"Player's Data");
INI_WriteString(file,"Password",hashpass);
INI_WriteInt(file,"AdminLevel",0);
INI_WriteInt(file,"VIPLevel",0);
INI_WriteInt(file,"Money",0);
INI_WriteInt(file,"Scores",0);
INI_WriteInt(file,"Kills",0);
INI_WriteInt(file,"Deaths",0);
INI_WriteInt(file,"Adisable",0);
INI_Close(file);
Re: Y_ini Not Saving On Disconnect! -
Anak - 24.06.2013
Quote:
Originally Posted by ******
I'd set the tag as "Players_Data", no spaces or quotes.
|
now it stop loading account also.... -_- what i do?
Re: Y_ini Not Saving On Disconnect! -
Anak - 24.06.2013
i have this in login dialog:
pawn Код:
INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true, .extra = playerid);
can you give me example what you actually mean =)
Re: Y_ini Not Saving On Disconnect! -
Lordzy - 24.06.2013
Are you using a loop to save all player's data while the server is going to exit? Well then, I suggest you not to do so. Server exits fast, and the INI won't execute many player's data (If many are connected) and so there's a chance where your files get bugged. I suggest you to use a timer to update it.
Re: Y_ini Not Saving On Disconnect! -
Anak - 24.06.2013
Thanks i prefer timer :_)