SA-MP Forums Archive
Correct Syntax of Double if statements. - 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: Correct Syntax of Double if statements. (/showthread.php?tid=99116)



Correct Syntax of Double if statements. - shitbird - 25.09.2009

Hey lads, i've seem to of forgotten how to check 2 things in one line... yeah..

so this is what i've got.

pawn Код:
if(!strcmp(params[0], "Cookie",true)) && if(!strcmp(params[1], "Brownies",true)) return 1;
No, that's not what i got, but that's an example, how do you do it, i forgot :/.


Re: Correct Syntax of Double if statements. - Donny_k - 25.09.2009

pawn Код:
if ( this && that ) //and
if ( this || that ) //or
You have it like this (extra 'if'):

pawn Код:
if ( this ) && if ( that )
You also have extra '()' by the way dude but I know it was just an example.