mIRC Home    About    Download    Register    News    Help

Print Thread
need help #201284 24/06/08 10:26 AM
Joined: May 2008
Posts: 8
U
Unl Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
U
Joined: May 2008
Posts: 8
Hi guys,

I'm working on a script, and it works a bit:

This part works:

on *:input:*:{
if (($1 = !add) && ($nick = $me ) && ($chan = #alexander)) {
/cs aop # add $2
/cs op # $2
}
}

This part doesn't work:

on *:input:*:{
if (($1 = !unadd) && ($nick = $me ) && ($chan = #alexander)) {
/cs aop # del $2
/cs deop # $2
}
}

But, it is almost the same, i don't understand why the second part doesn't work...

Re: need help [Re: Unl] #201285 24/06/08 11:25 AM
Joined: Feb 2006
Posts: 181
C
Crinul Offline
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2006
Posts: 181
ON INPUT: Triggers when you enter text in an editbox in a channel window and press enter. You
should not check ($nick = $me )
You would want to remove the slashes from the code, and make this the end result:

Code:
on 1:INPUT:#alexander:{
  if ($1 == !add) {
    cs aop # add $2
    cs op # $2
  }
  elseif ($1 == !unadd) {
    cs aop # del $2
    cs deop # $2
  }
}

Re: need help [Re: Crinul] #201286 24/06/08 11:27 AM
Joined: May 2008
Posts: 8
U
Unl Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
U
Joined: May 2008
Posts: 8
Yeah, thx, but it must only work when i type it, not if someone else do it, but thanks!

Re: need help [Re: Unl] #201287 24/06/08 11:29 AM
Joined: Feb 2006
Posts: 181
C
Crinul Offline
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2006
Posts: 181
Hmm...

Read This:

ON INPUT: Triggers when you enter text in an editbox in a channel window and press enter. You
should not check ($nick = $me )


Re: need help [Re: Crinul] #201288 24/06/08 11:36 AM
Joined: May 2008
Posts: 8
U
Unl Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
U
Joined: May 2008
Posts: 8
It works, but, i still don't know what was wrong with my script...

Re: need help [Re: Unl] #201289 24/06/08 11:42 AM
Joined: Feb 2006
Posts: 181
C
Crinul Offline
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2006
Posts: 181
You should read mirc.chm

/help on input


Re: need help [Re: Crinul] #201310 24/06/08 05:23 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
The reason for your original script not working is that you put two identical events in the same scripfile. Either put them in different files, or join them like Crinul did with if ... elseif.