Hello there, I was wondering the following:
I recently made a script which used a "for" to link some vehicles to an interior.
It was something like this:
The thing is that it didn't work. The vehicles didn't link to the damn interior or the virtual world. Desperating.
When I removed the for and did it all like this
Surprisingly it worked. Why does this happen?
I recently made a script which used a "for" to link some vehicles to an interior.
It was something like this:
Code:
for(new i; i >= 10; i++)
{
LinkVehicleToInterior(rVehicles[i], 9);
SetVehicleVirtualWorld(rVehicles[i], 8);
}
When I removed the for and did it all like this
Code:
LinkVehicleToInterior(rVehicles[0], 9);
LinkVehicleToInterior(rVehicles[1], 9);
LinkVehicleToInterior(rVehicles[2], 9);
LinkVehicleToInterior(rVehicles[3], 9);
//etc.