28.07.2012, 14:47
Hello guys , this is my onplayerdeath callback
The commented part up there gives me this error :
when i remove it the error is gone , any help please?
pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
if(Account[playerid][gTeam]==Terrorists)
{
TerrorsCounter--;
}
else if(Account[playerid][gTeam]==Cops)
{
CopsCounter--;
}
Armour[playerid]=0;
SendDeathMessage(killerid, playerid, reason);
new kScore=GetPlayerScore(killerid);
/*if(NormalKill[killerid]==1)
{
}*/
if(NormalKill[playerid]==1)
{
GameTextForPlayer(playerid,"~g~You are DEAD.",5000,3);
}
return 1;
}
Код:
[16:53:47] [debug] Run time error 4: "Array index out of bounds" [16:53:47] [debug] Accessing element at index 65535 past array upper bound 499 [16:53:47] [debug] AMX backtrace: [16:53:47] [debug] #0 00014ef0 in public OnPlayerDeath () from teehee.amx