15.11.2012, 04:00
Could someone explain how to use the break statement?
I tried it in this way:
But it still used all 50 ids for what I wanted it to do. I want it to find the first thing with that == 1 then use that id for something else, hopefully someone could explain how break; works in loops, thanks!
I tried it in this way:
pawn Код:
for (id = 0; id < 50; id ++)
{
if (SOMETHING[id] == 1)
{
break;
}
//do something with only that one id which break was used on
}