Crashdetector help
#1

Hello, I made thread while ago. My problems were crashes on spawn(at hospital). So someone said I should get a crash detector. Now I got it and I got the problem. But, since I am new to crashdetector I dont know what this means:

PHP код:
[debugRun time error 4"Array index out of bounds"
[14:18:10] [debugAccessing element at index 65535 past array upper bound 499
[14:18:10] [debugAMX backtrace:
[
14:18:10] [debug#0 00078744 in public OnPlayerDeath () from LSSRP.amx 
This is the error I got on samp.exe
Someone please tell me the meaning of error or atleast give me the link of all erroers about crash detector or whatever.
Reply
#2

It looks as-if your not checking if "killerid" is INVALID_PLAYER_ID under OnPlayerDeath and then using "killerid" as an index to an array.

EG,
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{

    //imagine player did /kill command (or equivalent)
    //killerid would be equal to INVALID_PLAYER_ID which is 65536 (0xFFFF)

    //then this
    gPlayerData[ killerid ][ kills ]++;

    //is the same as this
    gPlayerData[ 65536 ][ kills ]++;
    return 1;
}
Could be something else but thats what i think it is.
Reply
#3

You havent told me how to fix this up. This worked in 0.3e as far I know. I dont know why doesnt it work now... I tried a lot of things, even removing things like those but didnt work. Still crashing and still the same problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)