OnPlayerDeath Error - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerDeath Error (
/showthread.php?tid=621638)
OnPlayerDeath Error -
Speaker - 13.11.2016
Error is
Код:
[01:20:47] [debug] AMX backtrace:
[01:20:47] [debug] #0 0008141c in public FC_OnPlayerDeath (playerid=1, killerid=65535, reason=54) at C:\Users\Anurag\Desktop\Call of Duty - Asia at War\gamemodes\cod8aawv1.1.pwn:5233
Error Line Marked With Red Colour
Код:
Anti_heal[playerid] = 0;
Anti_Give[playerid] = 0;
PlayerInfo[playerid][Deaths] ++;
PlayerInfo[killerid][Kills] ++;
Please help Me To Fix It
Re: OnPlayerDeath Error -
zPain - 13.11.2016
You must check if
killerid is a valid player.
PHP код:
if(killerid != INVALID_PLAYER_ID) {
PlayerInfo[killerid][Kills] ++;
}