mIRC Homepage
Posted By: Larra $rgb - 15/01/03 12:09 AM
can you use any identifiers inside rgb identifier?
like:
alias myidentifier return 100,100,100
echo -a $myidentifier (works)
echo -a $rgb($myidentifier) (it doesnt)
Posted By: Hammer Re: $rgb - 15/01/03 12:25 AM
//echo -a * $rgb($gettok($MyIdentifier,1,44),$gettok($MyIdentifier,2,44),$gettok($MyIdentifier,3,44))
* 6579300

$rgb expects 3 parameters, not 1 parameter with commas.
Posted By: Larra Re: $rgb - 15/01/03 12:50 AM
emm thanks, I was missunderstanding that
Posted By: LtGuide Re: $rgb - 15/01/03 01:57 AM
you could also do echo -a $rgb( [ $myidentifier ] )
Posted By: Hammer Re: $rgb - 15/01/03 02:41 AM
Interesting that [ ] worked when $eval() wouldn't. Good job finding that, though it does mean perhaps a rethink on when to use [ ] and when to use $eval( ,2).
Posted By: qwerty Re: $rgb - 15/01/03 02:14 PM
That's because [ ] brackets and $eval are not the same thing; they are designed for different purposes. $eval evaluates any variables/identifiers in the string and only that. Brackets, otoh, control the order of evaluation, something that $eval was not designed to do of course. So, in $rgb( [ %var ] ) , mirc evaluates %var before it deals with $rgb. (contrary to $rgb(%var), in which %var is evaluated after $rgb is parsed, so %var is considered a parameter).
© mIRC Discussion Forums