mIRC Homepage
Posted By: Tzar469 $remove and % - 26/02/08 06:58 AM
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?
Posted By: Bekar Re: $remove and % - 26/02/08 07:34 AM
works fine for me..

give us a specific example of it not working please.
Posted By: Riamus2 Re: $remove and % - 26/02/08 12:57 PM
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),+))

Posted By: Tzar469 Re: $remove and % - 27/02/08 01:46 AM
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
© mIRC Discussion Forums