mIRC Home    About    Download    Register    News    Help

Print Thread
#47666 07/09/03 12:07 AM
Joined: Dec 2002
Posts: 155
S
Strider Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Dec 2002
Posts: 155
The $submenu over-evaluation bug was not entirely fixed. While $submenu no longer over-evaluates the "menu item name" part of a menu definition, it still over-evaluates the "commands" part. Example:

menu status {
Subtest
.$eval($network,0) $+ :echo $eval($network,0)
.$submenu($subtest($1))
}

alias subtest {
if (!$isid) return
if ($1 isnum 1-3) {
if ($1 == 2) return $eval($me,0) $+ :echo $eval($me,0)
else return $+($1,:,$1)
}
}

If you click on "$me", mIRC should echo "$me" instead of <nickname> (just as it happens when you click on the "$network" item, which was not created using $submenu); but that doesn't happen. mIRC echoes <nickname>, which means that $submenu is completely ignoring $eval(,0).

#47667 08/09/03 12:36 PM
Joined: Dec 2002
Posts: 5,424
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,424
The change made to $submenu() in mIRC v6.1 will actually be undone in the next version, since it seems to have caused under-evaluation in scripts that used to work.

Also, this may just be an issue with $eval(), not $submenu(), since if you don't use $eval() it all works fine.

There are too many combinations of possible evaluations going on when using $submenu(), /return, $eval(), etc, so I can't see a solution to this right now.


Link Copied to Clipboard