OnplayerDeath and OnPlayerTakeDamage - Array index out of bounds
#4

Quote:
Originally Posted by NaS
Посмотреть сообщение
You should always check if killerid or issuerid is a valid player. If it's not a valid player, killerid and issuerid will be INVALID_PLAYER_ID (which is 0xFFFF, or 65536 - hence the array index out of bounds error at index 65536).
I read about this before I opened the thread, but where do I have to check it exactly in my code, if it's a "suicide", for example the death caused by falling, or burning etc?


@Sunehildeep
I changed it, and now I get these errors as well:

Код:
[debug]  Attempted to read/write array element at index 65535 in array of size 201
[debug] AMX backtrace:
[debug] #0 00251640 in public OnPlayerDeathACT (0, 65535, 54) from ClassRPG.amx
[debug] #1 0002c4f8 in public OnPlayerDeath (0, 65535, 54)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)