SA-MP Forums Archive
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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: break (/showthread.php?tid=185322)



break - iJumbo - 24.10.2010

can some explain me what is for break function in pawno ? becouse in wiki i dont understand thx


Re: break - LarzI - 24.10.2010

Break is used when you want to stop a loop.

pawn Код:
for(new something=0; something<somethingElse; something++)
{
    if(something == 10)
    {  
        //do what you want
        break; //stops the loop if something reaches 10
    }
}
Bad example, but it get's to the point.


Re: break - iJumbo - 24.10.2010

ahhh thx very much


Re: break - LarzI - 24.10.2010

No problem.