Array Index Out Of Bounds
#3

If a vehicle does not exist, GetVehicleModel returns 0 so subtracting 400 from it is negative index -400.
By the way, vehicle IDs start from 1. Using GetVehiclePoolSize or better yet foreach (if you create vehicles only in a single script) is better.
Reply


Messages In This Thread
Array Index Out Of Bounds - by Dokins - 15.04.2016, 13:22
Re: Array Index Out Of Bounds - by Godey - 15.04.2016, 13:43
Re: Array Index Out Of Bounds - by Konstantinos - 15.04.2016, 13:46
Re: Array Index Out Of Bounds - by Dokins - 15.04.2016, 14:06

Forum Jump:


Users browsing this thread: 1 Guest(s)