break
#1

hello guys i have question, is possible to use "break" for returning values from loop and breaking down a loop?
Example:
Код:
stock GetVehicleIDFromSQL(sqlid)
{
	for(new i = 1; i <= MAX_VEHICLES; i++)
	{
	    if(IsValidVehicle(i))
	    {
			if(sqlid == AVDB[i][CSQLID])
 			{
   				//return i;
   				break i;
  			}
   		}
	}
   	return INVALID_VEHICLE_ID;
}
Reply


Messages In This Thread
break - by speed258 - 18.12.2013, 12:23
Re: break - by Threshold - 18.12.2013, 12:40

Forum Jump:


Users browsing this thread: 2 Guest(s)