18.06.2013, 05:52
I fixed all the errors. I would suggest that you indent your code. Also it seems that you copied and pasted that tutorial you provided into your script.
I would also replace the hashing method you used (ubd_hash) with Whirlpool.
Anyways here's the fixed code.
http://pastebin.com/AqFLExw4
pawn Code:
public OnPlayerDisconnect(playerid, reason)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_Close(File);
} // You did this several times. Might be a result of copying and pasting.
new
string[64],
name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
switch(reason)
{
case 0: format(string,sizeof string,"{1E90FF}%s {006400}(ID:%d) {B22222}left the battlefield. {006400}(Timed out)",name);
case 1: format(string,sizeof string,"{1E90FF}%s {006400}(ID:%d) {B22222}left the battlefield. {006400}(Leaving)",name);
case 2: format(string,sizeof string,"{1E90FF}%s {006400}(ID:%d) {B22222}left the battlefield. {006400}(Kicked/Banned)",name);
}
return 1;
}
Anyways here's the fixed code.
http://pastebin.com/AqFLExw4