This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Faq-Script help

Old posts that have not been replied to for several years.
Locked
B
Balkanac
Voice
Posts: 12
Joined: Mon Aug 15, 2005 12:38 pm

Faq-Script help

Post by Balkanac »

Hello,

I've got a problem with this little script.
[17:11] Tcl error [faq]: wrong # args: should be "faq n u h c t"
Can anyone help me please?

Code: Select all

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)"
}
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

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

Code: Select all

bind msg - !faq faq
proc faq {n u h t} {
 putserv "PRIVMSG $n :<message goes here>"
}
B
Balkanac
Voice
Posts: 12
Joined: Mon Aug 15, 2005 12:38 pm

Post by Balkanac »

And public?

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


Sorry for my bad English :d
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

Code: Select all

bind pub - !faq faq
proc faq {n u h c t} {
 putserv "PRIVMSG $n :<message goes here>"
}
B
Balkanac
Voice
Posts: 12
Joined: Mon Aug 15, 2005 12:38 pm

Post by Balkanac »

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

Code: Select all

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)"
}
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

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

You also forgot the : in the putserv msg's.
B
Balkanac
Voice
Posts: 12
Joined: Mon Aug 15, 2005 12:38 pm

Post by Balkanac »

And again with the ":"

Code: Select all

[18:57] Tcl error [faq]: wrong # args: should be "faq n u h t"
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

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.
B
Balkanac
Voice
Posts: 12
Joined: Mon Aug 15, 2005 12:38 pm

Post by Balkanac »

Thanks greenbear!

:)
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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: Select all

bind pub - !faq foo
bind msg - faq foo
proc foo {nick args} {
   puthelp "notice $nick :<stuff>"
}
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

clever, never thought of that :o
Locked