mIRC Home    About    Download    Register    News    Help

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



Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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 , *. )



Link Copied to Clipboard