mIRC Homepage
Posted By: Stephen script weirdness - 15/04/20 05:55 PM
Having a weird error happen with a set command


Under Variables I have

%wildtest *.dip0.t-ipconnect.de

If I run this command in the status window it works fine

//set %wildtest2 $remove(%wildtest , *. )

and variable is set

%wildtest2 dip0.t-ipconnect.de

However inside of the script I am getting * /set: invalid parameters (line 5, wildhost.ini)

line 5

if *. isin %wildtest //set %wildtest2 $remove(%wildtest , *. )

Do I need to break out the *. is that being set as a command string inside of the script?

Ideas thoughts?


Posted By: maroon Re: script weirdness - 15/04/20 06:31 PM
Unless you're doing a challenge where the goal is to make a script containing the fewest possible characters, it's best to use the appropriate level of parenthesis, especially since that makes the script much easier to read. I confess I've skipped answering some forum posts because the lack of parenthesis has made them harder to read and understand. It also helps when forum posts include the CODE tag

generates the error you describe:
Code
//var %wildtest test*.test | if *. isin %wildtest //set %wildtest2 $remove(%wildtest , *. )


does not:
Code
//var %wildtest test*.test | if (*. isin %wildtest) //set %wildtest2 $remove(%wildtest , *. )

© mIRC Discussion Forums