Page 1 of 1

Doube IF scripting:

PostPosted: Sun Jun 10, 2007 7:11 pm
by d-soldier
I need to make an doube if statement, and can't seem to get it right... It needs to depend on two variables, such as:

if(shieldup = 0) & (udi_shield.textNumber=>0)
{
CreateActor("shieldtest", "shield00000", "(none)", "(none)", 0, 0, false);;
udi_shield.textNumber-=1;;
}

But this obviously isn't scripted correctly... anyone?

PostPosted: Sun Jun 10, 2007 7:24 pm
by pixelpoop
if(shieldup == 0 && udi_shield.textNumber>=0)
{
CreateActor("shieldtest", "shield00000", "(none)", "(none)", 0, 0, false);
udi_shield.textNumber-=1;
}

use double equals when doing a test and single "=" for assigning a new value.

use a double "&"

and use > before the equals sign.

PostPosted: Sun Jun 10, 2007 7:27 pm
by d-soldier
Ahhh, I thought the double && was right, but it didn't work when I tried it, plainly because the rest of the script was messed up. Thanks!