Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Fors

$
0
0
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:

Code:

for(new i; i >= 10; i++)
{
  LinkVehicleToInterior(rVehicles[i], 9);
  SetVehicleVirtualWorld(rVehicles[i], 8);
}

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
Code:

LinkVehicleToInterior(rVehicles[0], 9);
LinkVehicleToInterior(rVehicles[1], 9);
LinkVehicleToInterior(rVehicles[2], 9);
LinkVehicleToInterior(rVehicles[3], 9);

//etc.

Surprisingly it worked. Why does this happen?

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>