[Server shuts down automaticly for about 4 seconds] -
DavidKember - 28.07.2014
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...
Re: [Server shuts down automaticly for about 4 seconds] -
Stanford - 28.07.2014
Use crashdetect plugin.
Re: [Server shuts down automaticly for about 4 seconds] -
DavidKember - 28.07.2014
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.
Re: [Server shuts down automaticly for about 4 seconds] -
Tamer - 28.07.2014
Is your script compiled with -d3?
Re: [Server shuts down automaticly for about 4 seconds] -
DavidKember - 28.07.2014
I don't know what -D3 means, and i don't know if my script is compilled with it, or no.
Re: [Server shuts down automaticly for about 4 seconds] -
Tamer - 28.07.2014
http://forum.sa-mp.com/showpost.php?...32&postcount=7
Do this and wait for it to crash.
Re: [Server shuts down automaticly for about 4 seconds] -
DavidKember - 28.07.2014
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.
Re: [Server shuts down automaticly for about 4 seconds] -
Tamer - 28.07.2014
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.
Re: [Server shuts down automaticly for about 4 seconds] -
DavidKember - 28.07.2014
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.
Re: [Server shuts down automaticly for about 4 seconds] -
Konstantinos - 28.07.2014
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.