Need help. | Offer rep ++ for that person can help me!
#1

Hi.

I put crashdetect on my server. I have 4 crashes. I fixed 2 but this problem i don't know how.
It gave me this:
Код:
[21:15:23] [debug] Run time error 4: "Array index out of bounds"
[21:15:23] [debug]   Accessing element at index 65535 past array upper bound 518536
[21:15:23] [debug] Backtrace (most recent call first):
[21:15:23] [debug] #0  public OnPlayerDeath(playerid=2, killerid=65535, reason=255)+0x30c at C:\Documents and Settings\user\My Documents\RAS&MAP&FS&SERVERS\RAS\gamemodes\RAS.pwn:1115
[21:15:23] [death] [BRT]NusHH died 255
And the line is:
Код:
if ( PlayerInfo[ killerid ][ KillingSpree ] != PlayerInfo[ killerid ][ bKillingSpree ] )
That debug is typed in my server_log when a player death for reason 255 or 54. If it is needed i can show all OnPlayerDeath...

PS. - Sorry for my bad english.
Reply
#2

You must check if killerid is connected:
pawn Код:
if(IsPlayerConnected(killerid))
{
     if(PlayerInfo[ killerid ][ KillingSpree ] != PlayerInfo[ killerid ][ bKillingSpree ])
     {

     }
}
Reply
#3

pawn Код:
if(IsPlayerConnected(killerid))
{
    if(PlayerInfo[killerid][KillingSpree] != PlayerInfo[killerid][bKillingSpree])
    {
    }
}
Reply
#4

Thanks I gave +1 rep for you 2 :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)