mIRC Home    About    Download    Register    News    Help

Print Thread
script weirdness #267185 15/04/20 05:55 PM
Joined: Dec 2019
Posts: 13
S
Stephen Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Dec 2019
Posts: 13
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?



Re: script weirdness [Re: Stephen] #267187 15/04/20 06:31 PM
Joined: Jan 2004
Posts: 1,300
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,300
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 , *. )