Errors in crashdetect "Array index out of bounds" HELP
#4

Quote:
Originally Posted by Troydere
Посмотреть сообщение
killerid returns INVALID_PLAYER_ID if playerid died by itself (falling)

INVALID_PLAYER_ID is defined as 65535.

You're trying to put the 65535 value inside your (i guess) MAX_PLAYERS array, it does not have space to be there.

You should add a check in order for this to not happen:

Код:
if(killerid == INVALID_PLAYER_ID) return 1;
on top most of the callback.
That's bad, deaths won't increase unless the killerid be valid, a condition checking if the killerid isn't valid should be added where something related to killerid is called, with exception of SendDeathMessage.

PHP код:
if(killerid != INVALID_PLAYER_ID)
{
   
Kills[killerid]++; //example
}
//Rest of the code where killerid isn't involved. 
Reply


Messages In This Thread
Errors in crashdetect "Array index out of bounds" HELP - by tomasfernandez - 17.03.2017, 22:52
Re: Errors in crashdetect "Array index out of bounds" HELP - by Toroi - 17.03.2017, 23:13
Respuesta: Errors in crashdetect "Array index out of bounds" HELP - by tomasfernandez - 17.03.2017, 23:29
Re: Errors in crashdetect "Array index out of bounds" HELP - by Jelly23 - 17.03.2017, 23:30
Re: Errors in crashdetect "Array index out of bounds" HELP - by Toroi - 17.03.2017, 23:34

Forum Jump:


Users browsing this thread: 2 Guest(s)