28.06.2013, 11:37
Hey guys, I just copied this from OnPlayerDisconnect and when I compile it, it gives me a crash.
Can you please help me to fix it?
Код:
forward Save(playerid); public Save(playerid); { new INI:file = INI_Open(Path(playerid)); //will open their file; INI_SetTag(file,"Player's Data");//We will set a tag inside of user's account called "Player's Data" INI_WriteInt(file,"Money",GetPlayerMoney(playerid));//We will save his money inside of his account INI_WriteInt(file,"Scores",GetPlayerScore(playerid));//We will save his score inside of his account INI_WriteInt(file,"Kills",pInfo[playerid][Kills]);//As explained above INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]);//As explained above INI_WriteInt(file,"TGoto",pInfo[playerid][Toggoto]); INI_Close(file);//Now after we've done saving their data, we now need to close the file return 1; }