Correct Syntax of Double if statements.
#1

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 :/.
Reply
#2

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)