mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2003
Posts: 38
O
Olathe Offline OP
Ameglian cow
OP Offline
Ameglian cow
O
Joined: Sep 2003
Posts: 38
'echo 4 -a $replace(%!a, a, t)' doesn't work. It should echo '%t'.

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
%!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.


-KingTomato
Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
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: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
$replace($+(%,a), a, t)

Would be the solution, as mentioned.

Eamonn.


Link Copied to Clipboard