HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

And Syntax

11-23-2004, 12:20 PM#1
Sicknesslife
Hello,


I am trying to do an if statement with two conditions but not embbeded. In other words a simple and (&&) statement.

Code:
if ((udg_BloodGoutLVL == 1) && (IsUnitAliveBJ(udg_Fistandantilus)) == true ))then

do stuff


but when i do it i get

expected ')'

Is my syntax wrong again or is this the incorrect way to do this, do i have to use the GetBooleanAnd()?
11-23-2004, 02:19 PM#2
AIAndy
It is and, not &&
Also I think there is one closing bracket too much at the end.
== true is pointless and can be removed as it does nothing.
11-23-2004, 04:03 PM#3
curi
== true ))

delete the above and replace w/ one closing paren.

or delete the extra closing paren right before that after
11-25-2004, 07:57 PM#4
Sicknesslife
thanks for the help, too much old javascript in my brain, lol

I just broke into the Blizzard.j and common.j, they are helping loads, should have done so before i asked all the noob questions. hopefully my questions will be of a slightly higher calibre from now on and actually worth the time to answer.