mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2006
Posts: 167
P
Vogon poet
OP Offline
Vogon poet
P
Joined: Aug 2006
Posts: 167
I need the following distinct logic, but mIRC isn't letting me !negate the whole of ((%b == 1) && (%c == 1))

Code:
if (%a = 1) && (!((%b == 1) && (%c == 1))) echo -s Success!

What am I doing wrong?

I can only get this exact logic to work by turning ((%b == 1) && (%c == 1)) into a single $identifier via aliasing, like so:

Code:
alias pair {
  if (%b == 1) && (%c == 1) return $true
  else return $false
}

if (%a == 1) && (!$pair) echo Success!

Then I get the logic I want. But I don't want to rely on an alias to achieve it.

Joined: Jul 2006
Posts: 4,150
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,150
You're doing nothing wrong, the ! has been implemented only for %variables and $identifiers, but you can always tell the opposite with ((%b != 1) || (%c != 1))


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Aug 2006
Posts: 167
P
Vogon poet
OP Offline
Vogon poet
P
Joined: Aug 2006
Posts: 167
Thank you!


Link Copied to Clipboard