mIRC Home    About    Download    Register    News    Help

Print Thread
#77070 28/03/04 11:39 PM
Joined: Mar 2004
Posts: 5
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Mar 2004
Posts: 5
Hey, I just started scripting yesterday and I am having trouble with remotes. I'm workign on a greet option for my bot but everytime I try to change the gree massage, it says You're not channel operator.
Code:
   ;if user is an op set the greet
  if ($nick == isop) {
    //set -sn %greet $$1 $2 $3 
    /say 0Greeting Message set!
    /say Greeting Message is now: %greet
  }
  ;if not tell them so
  else {
    //msg $nick 4You're not a channel operator!
  }
}


Any help would be grealy appreciated. Thanks.

#77071 28/03/04 11:44 PM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
Code:
 ;if user is an op set the greet
  if ($nick isop $chan) { //set -sn %greet $$1 $2 $3 | /say 0Greeting Message set! | /say Greeting Message is now: %greet }
  else { //msg $nick 4You're not a channel operator!  } 



You could also use:

if ($nick isop #) {


Those who fail history are doomed to repeat it
#77072 28/03/04 11:52 PM
Joined: Mar 2004
Posts: 5
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Mar 2004
Posts: 5
I see what I did wrong! Thanks for the fast reply!

#77073 28/03/04 11:58 PM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
anytime smile Glad to be of help smile Is why we're here (to get or give answers) smile


Those who fail history are doomed to repeat it
#77074 29/03/04 12:02 AM
Joined: Mar 2004
Posts: 5
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Mar 2004
Posts: 5
Actually, it still dosn't work... =\

Code:
 on *:TEXT:!greetset*:{  
 ;if user is an op set the greet  if 
($nick isop $chan) 
{ //set -sn %greet $$1 $2 $3 | /say 0Greeting Message set! | /say Greeting Message is now: %greet }  
else { //msg $nick 4You're not a channel operator!  } }  


Everything looks fine....I heard that I can't do it myself, that somebody else has to type !greetset to set the gret. Is this true or what?

EDIT: It still says I'm not channel op! =\

Last edited by Skyrider; 29/03/04 12:06 AM.
#77075 29/03/04 12:04 AM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
stupid me - try this:

on *:TEXT:!greetset*:#: {
($nick isop $chan) { //set -sn %greet $$1 $2 $3 | /say 0Greeting Message set! | /say Greeting Message is now: %greet }
else { //msg $nick 4You're not a channel operator! } }

I forgot the # to designate WHERE to listen for it!!!! oy


Those who fail history are doomed to repeat it
#77076 29/03/04 12:10 AM
Joined: Mar 2004
Posts: 5
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Mar 2004
Posts: 5
Now I get all of these errors using that code you posted:
Code:
 * No such identifier: $chan) (line 4, script.ini)
-
* You are not on a channel (line 4, script.ini)
-
($NICK Unknown command
-
* You are not on a channel (line 4, script.ini) 


NEVERMIND!!! I got it to work!! YAY smile

Last edited by Skyrider; 29/03/04 12:19 AM.
#77077 29/03/04 12:18 AM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
sounds like you're missing a (, ), {, or }. Can you paste me the code as it appears in the file please??


Those who fail history are doomed to repeat it
#77078 29/03/04 12:21 AM
Joined: Mar 2004
Posts: 5
S
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Mar 2004
Posts: 5
I wasn't. It was a problem with the channels :P I got it fixed though. Thanks for your help.

#77079 29/03/04 12:24 AM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
oh, ok, glad it finally worked smile


Those who fail history are doomed to repeat it

Link Copied to Clipboard