SA-MP Forums Archive
Crashdetector 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: Crashdetector help (/showthread.php?tid=429162)



Crashdetector help - Harry_F. - 08.04.2013

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.


Re: Crashdetector help - iggy1 - 08.04.2013

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.


Re: Crashdetector help - Harry_F. - 11.04.2013

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.