[HELP] "Array Index out of bounds"
#8

Your code is trying to utilize 165 different "CarSpawns" but you've only initialized 1.

Code:
public OnGameModeInit()
{
for(new i = 0; i < sizeof(CarSpawns); i++)
	{
              AddCar(i);
	}
	      CarInit();
	return 1;
}
Replacing your old code with that will prevent you from out reaching the amount of coordinates you've created, but be aware of your vehicle limits when adding future coordinates.
Reply


Messages In This Thread
[HELP] "Array Index out of bounds" - by hatcis - 17.11.2018, 05:09
Re: [HELP] "Array Index out of bounds" - by Mencent - 17.11.2018, 05:55
Re: [HELP] "Array Index out of bounds" - by hatcis - 17.11.2018, 15:56
Re: [HELP] "Array Index out of bounds" - by Joe Staff - 17.11.2018, 16:53
Re: [HELP] "Array Index out of bounds" - by kingmk - 17.11.2018, 21:43
Re: [HELP] "Array Index out of bounds" - by hatcis - 18.11.2018, 02:29
Re: [HELP] "Array Index out of bounds" - by hatcis - 18.11.2018, 02:31
Re: [HELP] "Array Index out of bounds" - by Joe Staff - 18.11.2018, 04:00
Re: [HELP] "Array Index out of bounds" - by hatcis - 18.11.2018, 04:02

Forum Jump:


Users browsing this thread: 1 Guest(s)