[Server shuts down automaticly for about 4 seconds]
#1

Hello, my server shuts down automaticly after running , it takes like 4 seconds then shuts down, i checked the logs, mysql and everything was ok, connected & running, also the script loads perfect, then it shuts down without leaving any logs why, checked with crashdetect aswell, no errors, weird...
Reply
#2

Use crashdetect plugin.
Reply
#3

If you can read, i clearly explaned that i also used crashdetect, if you can't help me, no need to increase your post count, read the whole text before commenting.
Reply
#4

Is your script compiled with -d3?
Reply
#5

I don't know what -D3 means, and i don't know if my script is compilled with it, or no.
Reply
#6

http://forum.sa-mp.com/showpost.php?...32&postcount=7

Do this and wait for it to crash.
Reply
#7

I got these two when loading the gamemode

[12:52:27] [debug] Run time error 4: "Array index out of bounds"
[12:52:27] [debug] Accessing element at index 500 past array upper bound 499
[12:52:27] [debug] AMX backtrace:
[12:52:27] [debug] #0 003b8e4c in public OnLoadDynamicDoors () from Yolo.amx

[12:52:27] [debug] Run time error 4: "Array index out of bounds"
[12:52:27] [debug] Accessing element at index 400 past array upper bound 399
[12:52:27] [debug] AMX backtrace:
[12:52:27] [debug] #0 003b5564 in public OnLoadGates () from Yolo.amx
[12:52:27] [Gang Points] Loaded.
Reply
#8

Quote:
Originally Posted by DavidKember
Посмотреть сообщение
I got these two when loading the gamemode

[12:52:27] [debug] Run time error 4: "Array index out of bounds"
[12:52:27] [debug] Accessing element at index 500 past array upper bound 499
[12:52:27] [debug] AMX backtrace:
[12:52:27] [debug] #0 003b8e4c in public OnLoadDynamicDoors () from Yolo.amx

[12:52:27] [debug] Run time error 4: "Array index out of bounds"
[12:52:27] [debug] Accessing element at index 400 past array upper bound 399
[12:52:27] [debug] AMX backtrace:
[12:52:27] [debug] #0 003b5564 in public OnLoadGates () from Yolo.amx
[12:52:27] [Gang Points] Loaded.
You have three options right now.

You may show us the OnLoadDynamicDoors and OnLoadGates to us.
You may find the issue on your own by checking each single line you wrote at those two public functions.
You may wait for someone who knows what these debug messages mean, but without browsing code Idk if anyone can do a pinpoint accurate cause.
Reply
#9

I'll wait for someone, i am not too proffesional when it comes to these errors, thanks for your help man, you got my +rep , i hope i fix this -_- srsly.
Reply
#10

Let's say you declare an array with size of MAX_PLAYERS (500 in your case) so the valid indexes will be 0-499. If using a loop like that:
pawn Код:
// an example (this is incorrect, read below why):
for(new i = 0; i <= MAX_PLAYERS; i++)
will go from 0 to 500 and it will cause the run time error 4 for accessing element at index 500 past array upper bound 499.

So you'll need to either replace "<=" with "<" or "!=" or use foreach for player loops (recommended) which loops only through connected players and it will never go out of bounds.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)