Server crash -
feartonyb - 10.12.2013
My server is crashing randomly, debug:
Код:
[11:06:16] [debug] [CH.amx]: In file 'C:\Users\Stanley\Desktop\CroHerze\CHRP\gamemodes\CH.pwn' at line 410:
[11:06:16] [debug] [CH.amx]: Run time error 4: "Array index out of bounds"
[11:06:16] [debug] [CH.amx]: Array max. index is 99 but accessing an element at 65535
[11:06:16] [debug] [CH.amx]: Call stack (most recent call first):
[11:06:16] [debug] The server has crashed executing 'CH.amx'
[11:06:16] [debug] [CH.amx]: Call stack (most recent call first):
Line 410 and around:
Код:
410: new Float:autoskola_poligon[] = {
411: -1044.0896,-508.5917,-1044.7163,-530.4819,-1064.3956,-530.2775,-1063.9473,-508.0573,-1044.0896,-508.5917
412: };
Re: Server crash -
Scrillex - 10.12.2013
uumm the problem is in
-1044.0896,-508.5917,-1044.7163,-530.4819,-1064.3956,-530.2775,-1063.9473,-508.0573,-1044.0896,-508.5917
Make a list like x y z coords not just all in one peace..
Re: Server crash -
feartonyb - 10.12.2013
It's just x and y and that can't crash the server.
Tested and still same
Re: Server crash -
Scrillex - 10.12.2013
How you are using it? Could you show a little bit more code.
Re: Server crash -
feartonyb - 10.12.2013
It's polygon script, created with SA:MP Zone editor.
Two days ago it was working just fine when I had 4 polygons, now I changed a lot of script, but I use same method
Re: Server crash -
Scrillex - 10.12.2013
those errors say
Run time error 4: "Array index out of bounds"
[11:06:16] [debug] [CH.amx]: Array max. index is 99 but accessing an element at 65535
You are using to big index on array
So basically what you need is to make just it is an example something to MAX of the zones.
new ZONE[MAX_ZONE];
Just something like this
https://sampforum.blast.hk/showthread.php?tid=132976
Re: Server crash -
feartonyb - 10.12.2013
Bro I know that it says, but I don't see a problem.
I got AutoskolaPol[8];
under ongamemodeinit:
AutoskolaPol[0] = CreateDynamicPolygon(autoskola_poligon);
Re: Server crash -
feartonyb - 10.12.2013
Bump, really need fix ASAP
Re: Server crash -
SickAttack - 10.12.2013
Well try this:
Код:
new Float:autoskola_poligon[] = {
{-1044.0896,-508.5917,-1044.7163,-530.4819,-1064.3956,-530.2775,-1063.9473,-508.0573,-1044.0896,-508.5917}
};
Re: Server crash -
feartonyb - 10.12.2013
Still same :/
I don't think that log is correct