Vehicle Load Error
#5

My resource is T0pAz's vehicle system, I'm just trying to memorize it and understand the things how they work. I don't really understand this part:

Код:
stock VehicleLoadAll()
{
	new index = 0;
	while(fexist(VehiclePath(index)))
	{
	    for(new i=0; i<MAX_VEHICLES; i++)
	    {
	        if(validcar[i])
	        {
	            VehicleLoad(index, VehiclePath(index));
	            index++;
	        }
	    }
	}
	printf("Vehicles Loaded: %i", index);
}
What do you mean by using break; ? Something like this?

Код:
stock VehicleLoadAll()
{
	new index = 0;
	while(fexist(VehiclePath(index)))
	{
	    for(new i=0; i<MAX_VEHICLES; i++)
	    {
	        if(validcar[i])
	        {
	            VehicleLoad(index, VehiclePath(index));
	            index++;
	        }
                else
                {
                    break;
                }
	    }
	}
	printf("Vehicles Loaded: %i", index);
}
Reply


Messages In This Thread
Vehicle Load Error - by DOL4N - 17.05.2015, 11:52
Re: Vehicle Load Error - by [LvZ]Free - 17.05.2015, 11:54
Re: Vehicle Load Error - by DOL4N - 17.05.2015, 11:56
Re: Vehicle Load Error - by Konstantinos - 17.05.2015, 12:04
Re: Vehicle Load Error - by DOL4N - 17.05.2015, 12:18
Re: Vehicle Load Error - by Konstantinos - 17.05.2015, 12:35
Re: Vehicle Load Error - by DOL4N - 17.05.2015, 12:38
Re: Vehicle Load Error - by Konstantinos - 17.05.2015, 12:48
Re: Vehicle Load Error - by DOL4N - 17.05.2015, 13:01

Forum Jump:


Users browsing this thread: 1 Guest(s)