How i can stop a loop correctly? +REP!!
#1

I made this code, i want about if it found one empty slot, the loop stop, how i can do it?

pawn Код:
CMD:comprarveh(playerid, params[])
{
if(sscanf(params,"d", params[0])) { } else {
if(params[0] >= 400 && params[0] <= 611)
{
new Variable, solicitud[254];
for(new i; i < MAX_VEHICLES; i++)
{
format(solicitud, sizeof(solicitud), "SELECT * FROM `vehiculos` WHERE %d", i);
mysql_pquery(mysql, solicitud, "ProcesarCompra", "ddd", Variable, i, params[0]);
}
}
}
}

//---------------------------------------------

stock ProcesarCompra(Variable, i, params[0])
{
new columnas, filas;
cache_get_data(columnas, filas)
if(!columnas)
{
Print("Hay un slot libre");
}
}
Reply


Messages In This Thread
How i can stop a loop correctly? +REP!! - by xHanks - 17.11.2014, 16:53
Re: How i can stop a loop correctly? +REP!! - by TakeiT - 17.11.2014, 17:22
Re : How i can stop a loop correctly? +REP!! - by Dutheil - 17.11.2014, 17:39
Re: How i can stop a loop correctly? +REP!! - by dominik523 - 17.11.2014, 18:57

Forum Jump:


Users browsing this thread: 1 Guest(s)