24.03.2016, 20:36
Hi,
i activated crashdetect plugins and it says
everytime anyone dies...
This is Onplayerdeath, can you help me to find the mistake?
On pawn it doesn't say errors..
Thanks a lot.
P.S. sorry for bad english, i'm italian..
i activated crashdetect plugins and it says
Код:
[14:44:52] [debug] Run time error 4: "Array index out of bounds" [14:44:52] [debug] Accessing element at index 65535 past array upper bound 2283564 [14:44:52] [debug] Backtrace (most recent call first): [14:44:52] [debug] #0 public OnPlayerDeath()+0xb9030 from cws8.0M.amx
This is Onplayerdeath, can you help me to find the mistake?
Код:
public OnPlayerDeath(playerid, killerid, reason) { if(mod_guerra == true) return MortiDuranteLaGuerra(playerid,killerid); death[playerid]++; kills[killerid]++; soldibancacws -= 2000; uscitebk += 2000; GivePlayerMoney(killerid, (GetPlayerMoney(playerid))); ResetPlayerMoney(playerid); ricaricapunticaz(killerid); GameTextForPlayer(playerid, "~r~Ucciso", 1000, 2); SendDeathMessage(killerid, playerid, reason); new name[MAX_PLAYER_NAME]; new string[256]; new deathreason[20]; GetPlayerName(playerid, name, sizeof(name)); GetWeaponName(reason, deathreason, 20); new killer[MAX_PLAYER_NAME]; GetPlayerName(killerid, killer, sizeof(killer)); if (strlen(deathreason) > 0) { format(string, sizeof(string), "[KILL] %s ha ammazzato %s. (%s)", killer, name, deathreason); } else { format(string, sizeof(string), "[KILL] %s ha ammazzato %s.", killer, name); } if(ondm[playerid] == true) return ondm[playerid] = false; SendClientMessageToAll(0xEB000FFF, string); new Float:X,Float:Y,Float:Z; GetPlayerPos(killerid, X, Y, Z); if(X >= 1379.583 && X <= 2136.347 && Y >= -2649.059 && Y <= -2412.194)//Anti DM 1 /stuntls { Autowarn(killerid); multa(killerid); GivePlayerMoney(playerid,1200); GivePlayerMoney(killerid,-1700); } if(X >= -2627.522 && X <= -1798.393 && Y >= 1436.379 && Y <= 2323.897)//Anti DM 2 /stuntsf { Autowarn(killerid); multa(killerid); GivePlayerMoney(playerid,1200); GivePlayerMoney(killerid,-1700); } return 1; }
Thanks a lot.
P.S. sorry for bad english, i'm italian..