Wierd Problem
#1

I've just started having a very wierd, and annoying problem on my script, i have around 600+ lines under OnGameModeInit, and nothing is loading no more, only up to a certain point, my classes are loading, and with my cars been at the bottom of OnGameModeInit, they dont load at all, along with tonnes of other stuff!

I was wondering if there was a limit of how much you can put under OnGameModeInit, and if anyone has had this problem?
Reply
#2

check if you have any returns somwhere in OnGameModeInit - it will stop executing the rest of the code.
Reply
#3

Are you using a GM that you took from the forum ?
Reply
#4

@ Hustler:
The only return i have is righhttttt at the bottom of OnGameModeInit "return 1;"


@Peter:
No its my own script.
Reply
#5

Set debug messages every ~10 lines
Reply
#6

I did a few "print("1");" and 2, 3, 4 and found it doesnt complete the whole lot, stops after a few vehicles are created and misses out alot of lines.
Im really confused.

Edit: Stops after 173 lines.
Reply
#7

show us the code slightly before the last successfull print and the rest of it thereon.
Reply
#8

http://www.leelad.pastebin.com/d42eab254

This is the part the seems to kill the Init.
I get my "Created Buyable vehicle id 13." then it stops.
Reply
#9

Make sure you are still in the boundry for the array, if it's thirteen then you are one over already etc.

pawn Код:
new
  array[ 5 ];

for ( new i; i !=6; i ++ )
{
  array[ i ] = 1;
}
That will kill the script on the last itteration as the array is only five cells (0,1,2,3,4) and the loop would be trying to access the sixth one (4,5 << 5 doesn't exist).
Reply
#10

I've managed to fix this, overall it was 2 of my includes with carelessness mistakes in them, thanks for all who helped.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)