mIRC Homepage
Posted By: Skyrider Major Noob question - 28/03/04 11:39 PM
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.
Posted By: landonsandor Re: Major Noob question - 28/03/04 11:44 PM
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 #) {
Posted By: Skyrider Re: Major Noob question - 28/03/04 11:52 PM
I see what I did wrong! Thanks for the fast reply!
Posted By: landonsandor Re: Major Noob question - 28/03/04 11:58 PM
anytime smile Glad to be of help smile Is why we're here (to get or give answers) smile
Posted By: Skyrider Re: Major Noob question - 29/03/04 12:02 AM
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! =\
Posted By: landonsandor Re: Major Noob question - 29/03/04 12:04 AM
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
Posted By: Skyrider Re: Major Noob question - 29/03/04 12:10 AM
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
Posted By: landonsandor Re: Major Noob question - 29/03/04 12:18 AM
sounds like you're missing a (, ), {, or }. Can you paste me the code as it appears in the file please??
Posted By: Skyrider Re: Major Noob question - 29/03/04 12:21 AM
I wasn't. It was a problem with the channels :P I got it fixed though. Thanks for your help.
Posted By: landonsandor Re: Major Noob question - 29/03/04 12:24 AM
oh, ok, glad it finally worked smile
© mIRC Discussion Forums