Problem bugs crash
#1

Код:
    [13:15:24] [debug] AMX backtrace:
    [13:15:24] [debug] #0 00047eb0 in public OtherTimer () from eXtream.amx
    [13:15:25] [debug] Run time error 4: "Array index out of bounds"
    [13:15:25] [debug]  Accessing element at index 255 past array upper bound 99
-> public OtherTimer in gamemode

http://pastebin.com/2Dge3TdU

Код:
    [15:01:42] [debug] AMX backtrace:
    [15:01:42] [debug] #0 0001aeac in ?? () from eXtream.amx
    [15:01:42] [debug] #1 00002af8 in public Streamer_OnPlayerDisconnect () from eXtream.amx
    [15:01:42] [debug] #2 00001588 in public OnPlayerDisconnect () from eXtream.amx
    [15:01:42] [debug] #3 native Kick () [080d5430] from samp03svr
    [15:01:42] [debug] #4 0002ddd0 in public JBC_OnDialogResponse () from eXtream.amx
    [15:01:42] [debug] #5 00001c40 in public OnDialogResponse () from eXtream.amx
-> public OnPlayerDisconnect din gamemode

http://pastebin.com/An4ZKtjt

-> public OnDialogResponse in gamemode

http://pastebin.com/Vuj0DvJT

Код:
    [15:02:18] [debug] Run time error 4: "Array index out of bounds"
    [15:02:18] [debug]  Accessing element at index 266 past array upper bound 264
    [15:02:18] [debug] AMX backtrace:
    [15:02:18] [debug] #0 0004205c in public OnPlayerStateChange () from eXtream.amx
-> public OnPlayerStateChange in gamemode

http://pastebin.com/qxbQ2vJn
Reply
#2

Nothing?
Reply
#3

About the first, it should be up to 99 to the array, but you pass an array of 255. Check where you have 255 and search for your mistake. The other callbacks are a part of the code, you need to post everything from the callback.
Reply
#4

Quote:
Originally Posted by Dwane
Посмотреть сообщение
About the first, it should be up to 99 to the array, but you pass an array of 255. Check where you have 255 and search for your mistake. The other callbacks are a part of the code, you need to post everything from the callback.
I don't understand
Reply
#5

1.
pawn Код:
//An example:
#define MAX_SOMETHING 99
new
    something[ MAX_SOMETHING ] // The max cell of array is 99
;

// Somewhere
something[ 255 ] = value; // "Array index out of bounds", the max was 99 and you're using value over the max (255).
For the others callbacks, part of code were missing. Post the whole callback.
Reply
#6

What?
Reply
#7

I will try to explain it as simply as I can. You have an array [ ] with size of 99 and somewhere on the timer's callback, you're using over the max (99). You're using 255 instead.
Reply
#8

Change [255] in [99] ?
Reply
#9

Kinda. There's somewhere that gets cell of 255 value instead of 99. It can be either as a number or as a name. Be sure what you will change because it may cause more problems. That's why you need the debug.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)