"if" statment

Anything that doesn't fit into other forums.
jflkbob
Posts: 68
Joined: Mon Jun 26, 2006 9:33
Location: behind you

"if" statment

Post by jflkbob »

the if statment won't work correctally much any more, any ideas.
this should work from what i can rember about how the if works, but doesnt

Code: Select all

#include "zcommon.acs"

int KillHim;

script 1 (void)
{
KillHim=1;//player hits switch, variable is now one
}

script 2 (void)
{
If(KillHim==1);{Thing_Damage(0, 999, 0);}//should only work when KillHim is one, but works all the time
}
User avatar
BioHazard
Posts: 408
Joined: Mon Jul 25, 2005 10:02
Location: Middle of California where there is no air.
Contact:

Post by BioHazard »

WTF?

Just set the switch to do the damaging!


Oh, to answer your question: remove the semicolon after the if().
jflkbob
Posts: 68
Joined: Mon Jun 26, 2006 9:33
Location: behind you

Post by jflkbob »

oh yeha, oops :oops:
Post Reply

Return to “Off-Topic”