How to solve this eror + rep for help - 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: How to solve this eror + rep for help (
/showthread.php?tid=547940)
How to solve this eror + rep for help -
osman2571 - 26.11.2014
When player died in my server log is this.
How to fix that
My script don't have erors or warnings but this is eror i don't now why
Re: How to solve this eror + rep for help -
AndreT - 26.11.2014
INVALID_PLAYER_ID is defined as 65535.
In some circumstances, OnPlayerDeath is called with the killerid parameter set to INVALID_PLAYER_ID (aka 65535).
In your code, there is an instance of accessing some array of size 500 cells (MAX_PLAYERS) at index 65535, which is past its upper index 499.
Look for something like
array[killerid]
where you have not made sure that killerid is something else than INVALID_PLAYER_ID.