egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Faq-Script help

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
Balkanac
Voice


Joined: 15 Aug 2005
Posts: 12

PostPosted: Sun Sep 11, 2005 11:18 am    Post subject: Faq-Script help Reply with quote

Hello,

I've got a problem with this little script.

Quote:
[17:11] Tcl error [faq]: wrong # args: should be "faq n u h c t"


Can anyone help me please?

Code:
bind msg - !faq faq
proc faq {n u h c t} {
  putserv "PRIVMSG $t FAQ - Frequently Asked Questions - Häufig gestellte Fragen"
  putserv "PRIVMSG $t -"
  putserv "PRIVMSG $t Die offizielle FAQ Site von Vip-Net findet ihr unter: http://www.vip-net.ch/services/chat/faq_d.php"
  putserv "PRIVMSG $t -"
  putserv "PRIVMSG $t 1 Wie werde ich OP?"
  putserv "PRIVMSG $t 2 Wie registriere ich meinen Nick?"
  putserv "PRIVMSG $t 3 Wie registriere ich einen Channel?"
  putserv "PRIVMSG $t 4 Wie lauten die Chatregeln?"
  putserv "PRIVMSG $t 5 Was ist flood?"
  putserv "PRIVMSG $t 6 Was ist ein Bot?"
  putserv "PRIVMSG $t 7 Wie mache ich meinen eigenen Raum auf?"
  putserv "PRIVMSG $t 8 Wie wechsel ich meinen Nick?"
  putserv "PRIVMSG $t 9 Warum kann ich meinen Nick nicht wechseln?"
  putserv "PRIVMSG $t 10 Warum kann ich in einem bestimmten Raum nicht mehr chaten?"
  putserv "PRIVMSG $t 11 Was bedeuted das Schloss vor meinem Nick?"
  putserv "PRIVMSG $t 12 Wieso kann ich bestimmte Channels nicht mehr betreten (need correct key)?"
  putserv "PRIVMSG $t -"
  putserv "PRIVMSG $t Bitte gib die gewünschte Nummer (hier im P-Fenster) mit !faq<nummer> an. (z.B. !faq3)"
}
Back to top
View user's profile Send private message
greenbear
Owner


Joined: 24 Sep 2001
Posts: 733
Location: Norway

PostPosted: Sun Sep 11, 2005 11:29 am    Post subject: Reply with quote

msg binds only have 4 args, not 5, in the form of: 'nick userhost handle text'.

Code:
bind msg - !faq faq
proc faq {n u h t} {
 putserv "PRIVMSG $n :<message goes here>"
}
Back to top
View user's profile Send private message Send e-mail
Balkanac
Voice


Joined: 15 Aug 2005
Posts: 12

PostPosted: Sun Sep 11, 2005 12:43 pm    Post subject: Reply with quote

And public?

public cmd: !faq
and then at the private query put the answers.


Sorry for my bad English :d
Back to top
View user's profile Send private message
greenbear
Owner


Joined: 24 Sep 2001
Posts: 733
Location: Norway

PostPosted: Sun Sep 11, 2005 12:47 pm    Post subject: Reply with quote

Code:
bind pub - !faq faq
proc faq {n u h c t} {
 putserv "PRIVMSG $n :<message goes here>"
}
Back to top
View user's profile Send private message Send e-mail
Balkanac
Voice


Joined: 15 Aug 2005
Posts: 12

PostPosted: Sun Sep 11, 2005 12:51 pm    Post subject: Reply with quote

Error:
Quote:
[18:48] Tcl error [faq]: wrong # args: should be "faq n u h t"


Code:
bind pub - !faq faq
proc faq {n u h c t} {
  putserv "PRIVMSG $n FAQ - Frequently Asked Questions - Häufig gestellte Fragen"
  putserv "PRIVMSG $n -"
  putserv "PRIVMSG $n Die offizielle FAQ Site von Vip-Net findet ihr unter: http://www.vip-net.ch/services/chat/faq_d.php"
  putserv "PRIVMSG $n -"
  putserv "PRIVMSG $n 1 Wie werde ich OP?"
  putserv "PRIVMSG $n 2 Wie registriere ich meinen Nick?"
  putserv "PRIVMSG $n 3 Wie registriere ich einen Channel?"
  putserv "PRIVMSG $n 4 Wie lauten die Chatregeln?"
  putserv "PRIVMSG $n 5 Was ist flood?"
  putserv "PRIVMSG $n 6 Was ist ein Bot?"
  putserv "PRIVMSG $n 7 Wie mache ich meinen eigenen Raum auf?"
  putserv "PRIVMSG $n 8 Wie wechsel ich meinen Nick?"
  putserv "PRIVMSG $n 9 Warum kann ich meinen Nick nicht wechseln?"
  putserv "PRIVMSG $n 10 Warum kann ich in einem bestimmten Raum nicht mehr chaten?"
  putserv "PRIVMSG $n 11 Weitere Informationen rund um den Vip-Net.Ch Chat."
  putserv "PRIVMSG $n -"
  putserv "PRIVMSG $n Bitte gib die gewünschte Nummer (hier im P-Fenster) mit !faq<nummer> an. (z.B. !faq3)"
}
Back to top
View user's profile Send private message
greenbear
Owner


Joined: 24 Sep 2001
Posts: 733
Location: Norway

PostPosted: Sun Sep 11, 2005 12:56 pm    Post subject: Reply with quote

You still have that msg bind pointing to the same proc name.

You also forgot the : in the putserv msg's.
Back to top
View user's profile Send private message Send e-mail
Balkanac
Voice


Joined: 15 Aug 2005
Posts: 12

PostPosted: Sun Sep 11, 2005 12:58 pm    Post subject: Reply with quote

And again with the ":"
Code:
[18:57] Tcl error [faq]: wrong # args: should be "faq n u h t"
Back to top
View user's profile Send private message
greenbear
Owner


Joined: 24 Sep 2001
Posts: 733
Location: Norway

PostPosted: Sun Sep 11, 2005 1:01 pm    Post subject: Reply with quote

You can't have both a msg and a pub bind pointing to the same proc, so unload the one you don't want, or if you need both, use different proc names.
Back to top
View user's profile Send private message Send e-mail
Balkanac
Voice


Joined: 15 Aug 2005
Posts: 12

PostPosted: Sun Sep 11, 2005 1:04 pm    Post subject: Reply with quote

Thanks greenbear!

Smile
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Sep 11, 2005 1:10 pm    Post subject: Reply with quote

greenbear wrote:
You can't have both a msg and a pub bind pointing to the same proc, so unload the one you don't want, or if you need both, use different proc names.


actually, you can:
Code:

bind pub - !faq foo
bind msg - faq foo
proc foo {nick args} {
   puthelp "notice $nick :<stuff>"
}
Back to top
View user's profile Send private message Visit poster's website
greenbear
Owner


Joined: 24 Sep 2001
Posts: 733
Location: Norway

PostPosted: Sun Sep 11, 2005 1:36 pm    Post subject: Reply with quote

clever, never thought of that Surprised
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber