break; - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: break; (
/showthread.php?tid=563329)
break; -
Banditukas - 15.02.2015
Hi,
Can i break cikle like this:
Код:
for(new i = 0; i < 8; i ++ )
{
foreach(new n : Player)
{
///
}
break;
}
It break i cikle ?
Re: break; -
sw3das - 15.02.2015
Banditukas, ne 'cikle', o 'loop'
DD
(Englis translation: Banditukas, loop, not 'cikle'
DD)
You can, but that's pointless. It will break the loop after foreach loop has ended.
You should use this instead:
Код:
foreach(new n : Player)
{
///
}
Or tell what you want to do. I'll try to help