15.04.2017, 20:02
Add a check before the loop and terminate the function if vehicleid is equal to INVALID_VEHICLE_ID.
What i think it's happening is that the function FindVehicleID(carid) returns the value of INVALID_VEHICLE_ID if it couldn't find the vehicle and you're trying to fit INVALID_VEHICLE_ID inside VehicleInfo[your array with a limit lower than INVALID_VEHICLE_ID].
What i think it's happening is that the function FindVehicleID(carid) returns the value of INVALID_VEHICLE_ID if it couldn't find the vehicle and you're trying to fit INVALID_VEHICLE_ID inside VehicleInfo[your array with a limit lower than INVALID_VEHICLE_ID].