mIRC Home    About    Download    Register    News    Help

Print Thread
#195501 26/02/08 06:58 AM
T
Tzar469
Tzar469
T
This is the part of my script that I'm having a problem with:

Code:
var %1 $strip($remove($1,~,^,@,$chr(37),+))


I want to remove ~^@%+ from $1. The problem is that this does not work if $1 has a % because mIRC treats it as a variable. How do I fix this?

Last edited by Tzar469; 26/02/08 06:59 AM.
#195502 26/02/08 07:34 AM
Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
works fine for me..

give us a specific example of it not working please.

#195503 26/02/08 12:57 PM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Works fine... as long as you actually have the % in $1 and it wasn't evaluated prior to putting it into $1.

Test case (enter on edit line):
Code:
//tokenize 32 $eval(%this,0) | echo -a $strip($remove($1,~,^,@,$chr(37),+))


Riamus2 #195540 27/02/08 01:46 AM
T
Tzar469
Tzar469
T
Oh, it does work! The way I tested it out was the same method as you except I did not use $eval. I learned a handy thing today, thanks laugh


Link Copied to Clipboard