mIRC Homepage
Posted By: Unl need help - 24/06/08 10:26 AM
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...
Posted By: Crinul Re: need help - 24/06/08 11:25 AM
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
  }
}
Posted By: Unl Re: need help - 24/06/08 11:27 AM
Yeah, thx, but it must only work when i type it, not if someone else do it, but thanks!
Posted By: Crinul Re: need help - 24/06/08 11:29 AM
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 )

Posted By: Unl Re: need help - 24/06/08 11:36 AM
It works, but, i still don't know what was wrong with my script...
Posted By: Crinul Re: need help - 24/06/08 11:42 AM
You should read mirc.chm

/help on input

Posted By: Horstl Re: need help - 24/06/08 05:23 PM
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.
© mIRC Discussion Forums