Server crash
#1

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: };
Reply
#2

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..
Reply
#3

It's just x and y and that can't crash the server.
Tested and still same
Reply
#4

How you are using it? Could you show a little bit more code.
Reply
#5

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
Reply
#6

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
Reply
#7

Bro I know that it says, but I don't see a problem.

I got AutoskolaPol[8];

under ongamemodeinit:
AutoskolaPol[0] = CreateDynamicPolygon(autoskola_poligon);
Reply
#8

Bump, really need fix ASAP
Reply
#9

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}
};
Reply
#10

Still same :/

I don't think that log is correct
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)