When i add this code in my script and compile it...it shows Pawn compiler library stopped working..
Код:
function SaveAccountStats(playerid)
{
if(Logged[playerid] == 1)
{
new
INI:File = INI_Open(UserPath(playerid))
;
INI_SetTag(File,"data"); //Settings tags in y_ini is very important!
PlayerInfo[playerid][pSkin] = GetPlayerSkin(playerid);
PlayerInfo[playerid][pCash] = GetPlayerCash(playerid);
new
Float:x,
Float:y,
Float:z
;
GetPlayerPos(playerid,x,y,z);
PlayerInfo[playerid][pPos_x] = x;
PlayerInfo[playerid][pPos_y] = y;
PlayerInfo[playerid][pPos_z] = z;
INI_WriteInt(File,"Cash",PlayerInfo[playerid][pCash]);
INI_WriteInt(File,"Age",PlayerInfo[playerid][pAge]);
INI_WriteInt(File,"Sex",PlayerInfo[playerid][pSex]);
INI_WriteInt(File,"Skin",PlayerInfo[playerid][pSkin]);
INI_WriteFloat(File,"Pos_x",PlayerInfo[playerid][pPos_x]);
INI_WriteFloat(File,"Pos_y",PlayerInfo[playerid][pPos_y]);
INI_WriteFloat(File,"Pos_z",PlayerInfo[playerid][pPos_z]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
INI_Close(File);
}
return 1;
}
function SaveAccounts()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SaveAccountStats(i); //Will be used to save the account stats
}
}
}
Forward...
Your code is wrongly intended between brackets.. After if(Logged[playerid] ...). Try to solve it firstly.