Posts: 1,197
Threads: 213
Joined: Feb 2011
Reputation:
0
I have a major problem in my script, for some odd reason, any loop that is called causes the server to crash. I do not use foreach. I've never had this problem before and I have no idea why it's happening. Does anyone know any common causes for this type of thing? It's not a certain loop, but just any loop, crashes the server instantly so nothing has time to save causing in a rollback of information/
Use crashdetect plugin and debug the script, if necessary.
Posts: 3,793
Threads: 196
Joined: Jan 2010
Reputation:
0
Compile in debug mode so that it prints the lines.
pawn.cfg:
"-d3 -r"
Posts: 1,250
Threads: 92
Joined: Mar 2011
Reputation:
0
Under OnGameModeInit: Array index out of bounds
So, you have some loop that tries to use an invalid array index.
Now, show use ALL the "for" lines in that callback. (Just each of the for lines, you don't need to show their body scripts)
Posts: 1,250
Threads: 92
Joined: Mar 2011
Reputation:
0
#2: for(new i = 0; i <= sizeof(PedSkins)-1; i++)
should be for(new i = 0; i < sizeof(PedSkins); i++)
That's the best guess, but since you did sizeof(PedSkins)-1, it might not crash. But still you should print the sizes of each of your variable. and check if any of the loop is accessing invalid index.