mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2004
Posts: 155
D
Darkmnm Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Mar 2004
Posts: 155
Can someone tell me what is wrong with this coding. For some reason when I am @'ed or %'ed the word control is still disabled.
Code:
  
$iif(($me !ishop #) || (($me !isoq #) || ($me !isop #),$style(2)) Control

Joined: Nov 2004
Posts: 80
D
Babel fish
Offline
Babel fish
D
Joined: Nov 2004
Posts: 80
|| is the symbol mirc uses for logical or.

So when you are Op for example $me !isop # is false because you are op but $me !ishop #) and ($me !isoq #) are true.Result will always be true (so control will always be disabled)

Replace || with && .When you are a regular user or voiced
(($me !ishop #) && (($me !isoq #) && ($me !isop #) will be true and control will be disable.

Last edited by DrStein; 23/12/04 03:05 AM.

while (1) { fork(); }
Joined: Mar 2004
Posts: 155
D
Darkmnm Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Mar 2004
Posts: 155
Doesn't work at all with the $$'s replacing the ||'s. The word Control is completely gone from the nicklist when using it in this way.

Joined: Nov 2004
Posts: 80
D
Babel fish
Offline
Babel fish
D
Joined: Nov 2004
Posts: 80
Oops i wanted to modify the post and i hit delete by mistake :P

As i wrote before it was && not $$ grin

I think i need a coffee :tongue:

Last edited by DrStein; 23/12/04 03:28 AM.

while (1) { fork(); }
Joined: Mar 2004
Posts: 155
D
Darkmnm Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Mar 2004
Posts: 155
My bad, it was a typo while typing here. in the code i have &&'s not $$'s

Joined: Nov 2004
Posts: 80
D
Babel fish
Offline
Babel fish
D
Joined: Nov 2004
Posts: 80
Works fine here .Type exactly what you have written .Maybe you have forgoten a "(" or something like that

$iif(($me !ishop #) && ($me !isvoice #) && ($me !isop #),$style(2)) Control:echo -a test
works fine


while (1) { fork(); }
Joined: Nov 2004
Posts: 80
D
Babel fish
Offline
Babel fish
D
Joined: Nov 2004
Posts: 80
Yes you have and because i copy paste your code when i wrote it in here i have one more ( in my code too blush

You have (($me !isoq #) .It is ($me !isoq #)

Last edited by DrStein; 23/12/04 03:34 AM.

while (1) { fork(); }
Joined: Mar 2004
Posts: 155
D
Darkmnm Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Mar 2004
Posts: 155
the problem was with the isoq all together. with that bit taken out and the use of && it works perfectly. Thanks for your help it's greatly appreciated.

Joined: Nov 2004
Posts: 80
D
Babel fish
Offline
Babel fish
D
Joined: Nov 2004
Posts: 80
isoq isn't a default mirc operator.

I thought you had an alias for this .That why in my test i replaced it with isvoice


while (1) { fork(); }
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
It's not possible to create an alias and use it as an operator, unless if it's a custom identifier and in the sense of

if $isoq(...) { }

Greets


Gone.

Link Copied to Clipboard