Run time error 4
#1

Hello, i use crashdetect v4.8.5 and i get in serverlog this error:


Код:
[12:35:39] [debug] Run time error 4: "Array index out of bounds"
[12:35:39] [debug]  Accessing element at index 1100 past array upper bound 1099
[12:35:39] [debug] AMX backtrace:
[12:35:39] [debug] #0 003faf48 in public houseup () from SFR.amx
[12:35:39] [debug] Run time error 4: "Array index out of bounds"
[12:35:39] [debug]  Accessing element at index 1000 past array upper bound 999
[12:35:39] [debug] AMX backtrace:
[12:35:39] [debug] #0 00440474 in public BASEup () from SFR.amx
[12:35:45] [debug] Run time error 4: "Array index out of bounds"
[12:35:45] [debug]  Accessing element at index 1100 past array upper bound 1099
Sometimes the server autorestarts, it might be beacause of this error? If someone can help me, thank you very much. I don't know what does it mean exactly these errors.
Reply
#2

Hello. First of all, update crashdetect to its latest version which is 4.12 (it can be found: https://github.com/Zeex/samp-plugin-...ases/tag/v4.12). Then compile your script with the debug mode, it might gives lines which caused it. Goto pawno directory and create a file pawn.cfg
Open the file and write in it:
pawn Код:
-d3
Save it and re-compile your script. Make sure that any plugin and include is up to date (latest versions). Last, run your server and wait for the new results.

For the results you've posted.

You've an array with size of 1000 (it can get 0-999). Although when the max value must be 999 in [], you use 1000 inside public houseup. It might be caused by a loop, instead of number1 < number2, you may use number1 <= number2 and inside the loop you pass the number in the array [number1]. That's an example, I'm trying to explain you what "Array index out of bounds" is.

The same goes for the rest, but the array had size of 1100 (0-1099) and it used 1100 (the same situtation with the above).
Reply
#3

Thank you for help, I will do what you said and i will come back with a response.
Reply
#4

update all the plugins which your server uses
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)