24.06.2014, 22:14
Код:
[01:32:29] [debug] Run time error 4: "Array index out of bounds" [01:32:29] [debug] Accessing element at negative index -1 [01:32:29] [debug] AMX backtrace: [01:32:29] [debug] #0 0000d3cc in ?? (0xffffffff) from Test.amx [01:32:29] [debug] #1 00028ec4 in ?? (0x00000000) from Test.amx [01:32:29] [debug] #2 0002243c in public Streamer_OnPlayerDisconnect (0x00000000, 0x00000001) from Test.amx [01:32:29] [debug] #3 00015c00 in public SSCANF_OnPlayerDisconnect (0x00000000, 0x00000001) from Test.amx [01:32:29] [debug] #4 0001009c in ?? (0x00000000, 0x00000001) from Test.amx [01:32:29] [debug] #5 000052e4 in public OnPlayerDisconnect (0x00000000, 0x00000001) from Test.amx
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
SavePlayerData(playerid);
new string[80],string0[80],pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
new DisconnectReason[3][] = {"Klaida","Isejo","Kick/Ban"};
format(string, sizeof string, ""TCYELLOW"%s "TCCYAN"isejo is serverio["TCRED"%s""TCCYAN]", pName, DisconnectReason[reason]);
format(string0, sizeof string0, "%s paliko serveri [%s]", pName, DisconnectReason[reason]);
SendClientMessageToAll(COL_RED, string);
print(string0);
return 1;
}