mIRC Home    About    Download    Register    News    Help

Print Thread
O
Olathe
Olathe
O
'echo 4 -a $replace(%!a, a, t)' doesn't work. It should echo '%t'.

Joined: Jan 2003
Posts: 2,973
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Jan 2003
Posts: 2,973
%!a is being evaluated as a variable. Is this something that shouldn't happen? there is an array of different characters that a variable may be composed of, ! being one of them.

Joined: Apr 2004
Posts: 701
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 701
Unlike identifiers, you cannot escape variables like that - mIRC will try to fetch the variable named "%!a", which was probably empty in your case. Use "% $+ a" instead.


Saturn, QuakeNet staff
Joined: Dec 2002
Posts: 787
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 787
$replace($+(%,a), a, t)

Would be the solution, as mentioned.

Eamonn.


Link Copied to Clipboard