mIRC Home    About    Download    Register    News    Help

Print Thread
help with $replace #99745 04/10/04 11:17 PM
Joined: Sep 2004
Posts: 237
JAFO Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
Code:
  on 1:INPUT:*: {
  if ($1 == wins) msg $active $replace($1,!top10) 
}

Just messin around with the replace command and seems i am stumped... if i remove the replace command it does what i want but it messages the channel with "wins" and then "!top10".
Now when i have the replace command in there i get
* Invalid parameters: $replace (line 6, script1.ini)
in the active channel.
So where am i going wrong with this?

Re: help with $replace #99746 04/10/04 11:44 PM
Joined: May 2004
Posts: 95
W
wiebe Offline
Babel fish
Offline
Babel fish
W
Joined: May 2004
Posts: 95
you seem to be missing a parameter, example: $replace(text,replace-what,replace-with)

Re: help with $replace #99747 04/10/04 11:48 PM
Joined: Feb 2004
Posts: 714
Z
Zyzzyx26 Offline
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
You can halt the ON Input event, if you wish to, and then /msg whatever you like to the channel/query. Try this: on 1:INPUT:*: if ($1 == wins) { halt | msg $active !top10 }

Hope this can help smile
Zyzzyx.


"All we are saying is give peace a chance" -- John Lennon
Re: help with $replace #99748 05/10/04 02:18 AM
Joined: Sep 2004
Posts: 237
JAFO Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
Thanks , i used the $request example and managed to figure it out. Just dont know what use i would have for it though.
I dont think it would apply to what i was doing ... i was just messing with that command because i ran into it in my search to get what i wanted done(just tryin to learn anything new i can wink ).
And thank you for showing me the proper placement of the halt command , that really helped...
Thanks Again Guys/Galls!