mIRC Home    About    Download    Register    News    Help

Print Thread
$remove and % #195501 26/02/08 06:58 AM
Joined: Dec 2007
Posts: 24
T
Tzar469 Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2007
Posts: 24
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.
Re: $remove and % [Re: Tzar469] #195502 26/02/08 07:34 AM
Joined: Dec 2002
Posts: 503
B
Bekar Offline
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.

Re: $remove and % [Re: Tzar469] #195503 26/02/08 12:57 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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),+))



Invision Support
#Invision on irc.irchighway.net
Re: $remove and % [Re: Riamus2] #195540 27/02/08 01:46 AM
Joined: Dec 2007
Posts: 24
T
Tzar469 Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2007
Posts: 24
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