SA-MP Forums Archive
Hello - 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: Hello (/showthread.php?tid=583970)



Hello - Mariciuc223 - 01.08.2015

Hello, how work "break" ?

It's like a return ? (I need to know because i have a ZCMD command , and if i return in that loop , it stops ...)

I said there i have a command in ZCMD and give me Unknown Command ...


Re: Hello - Inn0cent - 01.08.2015

Show the command or try adding return 1; at the end of your command.


Re: Hello - Mariciuc223 - 01.08.2015

Lol , the whole command it's a loop dude, i know need a return , but if the function will goes with the loop ? I return in loop ... ? I need to know how that break works ...


Re: Hello - CodeStyle175 - 01.08.2015

break will just stop the loop
PHP код:
new value;
for(new 
i100i++){
     if(
i==51){
          
value=i;
          break;
     }
}
printf("%d",value); 



Re: Hello - Inn0cent - 01.08.2015

EDIT: Nvm.


Re: Hello - Mariciuc223 - 01.08.2015

Thanks but i done it myself ... And it works , there it's no Unknown Command