"if" statment

Post a reply

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: :angel: :angry: :beer: :bfg: :chaingun: :cheers: :blergh:
View more smilies

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

If you wish to attach one or more files enter the details below.

Maximum filesize per attachment: 1.5 MiB.

Expand view Topic review: "if" statment

by jflkbob » Wed Jul 19, 2006 8:48

oh yeha, oops :oops:

by BioHazard » Wed Jul 19, 2006 8:28

WTF?

Just set the switch to do the damaging!


Oh, to answer your question: remove the semicolon after the if().

"if" statment

by jflkbob » Wed Jul 19, 2006 7:48

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
}

Top