mIRC Home    About    Download    Register    News    Help

Print Thread
#127286 11/08/05 05:22 PM
Joined: Nov 2004
Posts: 842
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 842
I'm not sure how to explain this but

enter the following code into Remotes and do //echo $remove_test

Code:
alias remove_test {
  var %a = iRwxatb
  var %b = dgikoRswx
  var %c = d,g,i,k,o,R,s,w,x
  return $removecs(%a,%b) $removecs(%a,%c) $remove(%a,%b) $remove(%a,%c) <-> $removecs(iRwxatb,d,g,i,k,o,R,w,s,x)
  ; This should return atb but it doesn't. The last one works because the values we're typed in manually :x
}


For some reason it doesn't return the data through the variables, it just returns the data inputted ... The last one works correcly because they were typed in manually

I'm not sure if this effects any other mIRC versions but for some reason this happens in my version of mIRC v6.16


What do you do at the end of the world? Are you busy? Will you save us?
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
It is not a bug, the %c is the second parameter, so only the complete string "d,g,i,k,o,R,s,w,x" will be removed...

To tell the scripting engine to first parse %c and only then determine the parameters for $remove (or anything else), use [ and ] to change the parsing sequence...
Code:
alias remove_test {
  var %a = iRwxatb
  var %c = d,g,i,k,o,R,s,w,x
  return $removecs(%a, [ %c ] )
}

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
*ignore*

Last edited by Riamus2; 11/08/05 05:43 PM.

Invision Support
#Invision on irc.irchighway.net
Joined: Nov 2004
Posts: 842
Jigsy Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Nov 2004
Posts: 842
Oh ... thanks ^_^


What do you do at the end of the world? Are you busy? Will you save us?

Link Copied to Clipboard