PDA

View Full Version : more than one variable


chipmandoo
09-04-2001, 10:58 PM
i am new to this so u can laugh later.

i have this


on (press) {
_root:pull1 = random(4);
_root:pull2 = random(4);
_root:pull3 = random(4);

if (_root:pull1 == _root:pull2 == _root:pull2) {

_root:win = "win";
}else{
_root:win = "";
}
}

what i want to do is check to see if pull1, 2 and 3 are the same and is there are then display win in the thingy. so how do i compare more than one variable?

Jesse
09-05-2001, 03:06 AM
close.
if ((_root.pull1 == _root.pull2) and (_root.pull2 == _root.pull3)) {
// actions
}