OnPlayerTakeDamage Run time 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: OnPlayerTakeDamage Run time error (
/showthread.php?tid=624262)
OnPlayerTakeDamage Run time error -
Amads - 13.12.2016
PHP Code:
[19:39:44] [debug] Run time error 4: "Array index out of bounds"
[19:39:44] [debug] AMX backtrace:
[19:39:44] [debug] #0 0007250c in public OnPlayerTakeDamage (playerid=0, issuerid=65535, Float:amount=4.95000, weaponid=54, bodypart=3) at C:\Users\Me\map.pwn:2670
Those are some weird values... what's going on?
Re: OnPlayerTakeDamage Run time error -
GoldenLion - 13.12.2016
Nothing weird about that. Show your OnPlayerTakeDamage.
Re: OnPlayerTakeDamage Run time error -
Rdx - 13.12.2016
No need to show anything.
Just check
Code:
if(issuerid != INVALID_PLAYER_ID)
{
code
}
before using issuerid.
Re: OnPlayerTakeDamage Run time error -
Amads - 13.12.2016
Nvm, solved it! I had wrong weaponid assigned.