Problem detected with crashdetect
#1

Код:
[19:02:59] [debug] #0 00050be0 in public UpdatePlayerVelocimetro (1) from D79RP.amx
[19:02:59] [debug] Run time error 4: "Array index out of bounds"
[19:02:59] [debug]  Accessing element at index 376 past array upper bound 107

[00:10:45] [debug] Run time error 4: "Array index out of bounds"
[00:10:45] [debug]  Accessing element at index 14 past array upper bound 11
[00:10:45] [debug] AMX backtrace:
[00:10:45] [debug] #0 0003cc3c in public LoadPlayerData (4) from D79RP.amx
Someone could help me with these errors I found in the server.log, thanks to the crashdetect plugin
Reply
#2

Check your codes under UpdatePlayerVelocimetro and LoadPlayerData. There are arrays under your callbacks that requires it size to be increased since higher valued indexes are used in it. If such a value is not supposed to happen, you should sanity check those. Since you haven't posted any of your code, I'd show an example:
pawn Код:
new
   PlayerLoaded[15];
public LoadPlayer(playerid...) {

    PlayerLoaded[playerid] = 1;
    return 1;
}
The above code will work fine until "playerid" is less than 15. If it's 15 or exceeds the "PlayerLoaded" array size, you'll get the "Array index out of bounds" error. The fix that's to be done here is to increase "PlayerLoaded"'s size.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)