"||" statement not working within if statement.
#5

The double pipes mean OR, not AND. In your case you need AND (&&). I read code in my mind like this:

if not IsPlayerInRangeOfPoint OR not IsPlayerInRangeOfPoint OR not IsPlayerInRangeofPoint then do : ...

As you can see, it doesn't make sense. This however, makes a lot more sense:

if not IsPlayerInRangeOfPoint AND not IsPlayerInRangeOfPoint AND not IsPlayerInRangeOfPoint then do : ...
Reply


Messages In This Thread
"||" statement not working within if statement. - by Dokins - 31.01.2012, 13:36
Re: "||" statement not working within if statement. - by milanosie - 31.01.2012, 13:40
Re: "||" statement not working within if statement. - by Dokins - 31.01.2012, 13:45
Re: "||" statement not working within if statement. - by CaHbKo - 31.01.2012, 13:47
Re: "||" statement not working within if statement. - by Vince - 31.01.2012, 13:47
Re: "||" statement not working within if statement. - by [ABK]Antonio - 31.01.2012, 13:48
Re: "||" statement not working within if statement. - by Dokins - 31.01.2012, 13:56

Forum Jump:


Users browsing this thread: 2 Guest(s)