30.05.2015, 11:19
Never re-use variables to do 2 different things in a loop.
You used "i" first to loop through your rows, then after loading all the data from the first vehicle, you re-use "i" for the vehicle-id.
It will mess up your loop and you'll end up loading only one vehicle.
Also, the first row is row 0, not 1.
You used "i" first to loop through your rows, then after loading all the data from the first vehicle, you re-use "i" for the vehicle-id.
It will mess up your loop and you'll end up loading only one vehicle.
Also, the first row is row 0, not 1.