mIRC Home    About    Download    Register    News    Help

Print Thread
#64408 18/12/03 11:46 AM
Joined: Dec 2002
Posts: 266
Z
zack Offline OP
Fjord artisan
OP Offline
Fjord artisan
Z
Joined: Dec 2002
Posts: 266
When trying to do a $style for my @window, my variable contained a : (semi-colon), and this seem to cause issues, as seen with...
Code:
menu @testwin {
  $iif(%some:var == 1,$style(1)) Set:set %some:var 1
}

Just /window @testwin and try and rightclick to bring up the menu. I did further tests and the : in the final bit (Set:set %some:var 1) works fine, it's the : inside the $iif.

IMO this shouldn't affect the popup at all.. Just wondering if anyone else can replicate this. I'm using 6.12.


You won't like it when I get angry.
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
Of course it's creating problems,first thing mIRC looks in popup definitions is :, everything before that is item name and after is the command(s)...
That's the reason why item:cmd works, instead of having to add spaces around :
And as item is now " $iif(%some " mIRC starts to evaluate it and sees $iif( without closing bracket, flips out and decides there is something f*cked up here and don't show anything...


Code:
//if ( khaled isgod ) echo yes | else echo no
Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
I would advice using .~`' or something as a devider instead of characters which are used in the syntax's of mIRC itself


If it ain't broken, don't fix it!
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
I'd suggest either using a separator other than ':', or referencing it with $chr(58).

$iif($($+(%,some,$chr(58),var),2) == 1,$style(1)) Set:set %some:var 1
$iif( [ [ $+(%,some,$chr(58),var) ] ] == 1,$style(1)) Set:set %some:var 1
$iif( %some [ $+ [ $chr(58) ] $+ ] var == 1,$style(1)) Set:set %some:var 1


* cold edits his posts 24/7
Joined: Dec 2002
Posts: 266
Z
zack Offline OP
Fjord artisan
OP Offline
Fjord artisan
Z
Joined: Dec 2002
Posts: 266
Of course, but I'm saying it shouldn't be affected by that.


You won't like it when I get angry.

Link Copied to Clipboard