[Résolu] erreur sur un tcl
#1
Bonjour j'essaye de faire un tcl pour annoncer des pubs sur plusieurs salons ça marche mais j'ai une erreur
voici le code tcl:
Code :
setudef flag Annonce namespace eval ::SalonAnnonce {    # Commande pour activer sur un chan    variable onCmd "!annonce.on"    # Commande pour désactiver sur un chan    variable offCmd "!annonce.off"    # Flags requis pour activer ou désactiver    variable cmdFlags o } bind pub $::SalonAnnonce::cmdFlags $::SalonAnnonce::onCmd ::SalonAnnonce::pubOn bind pub $::SalonAnnonce::cmdFlags $::SalonAnnonce::offCmd ::SalonAnnonce::pubOff # proc SalonAnnonce::pubOn {nick host hand chan arg} {        if {[channel get $chan Annonce] == 0} {                channel set $chan +Annonce                puthelp "PRIVMSG $chan :\00314Activation des Annonces sur\00302 $chan" } {                puthelp "PRIVMSG $chan :\00314Les Annonces sont déjà activées sur\00302 $chan"        } }       # proc SalonAnnonce::pubOff {nick host hand chan arg} {        if {[channel get $chan Annonce] == 1} {                channel set $chan -Annonce                puthelp "PRIVMSG $chan :\00314Désactivation des Annonces sur\00302 $chan" } {                puthelp "PRIVMSG $chan :\00314Les Annonces sont déjà désactivées sur\00302 $chan"        } } bind cron - "*/5 * * * *" advertise set advertisetext { "annonce1" "annonce2" "annonce3" "annonce4" } proc advertise { nick uhost hand chan arg } { global advertisetext if {[channel get $chan Annonce]} { set msg_s [lindex $::advertisetext [expr {int(rand() * [llength $::advertisetext])}]] putserv "privmsg $chan : $msg_s" } }

et mon erreur
Code :
Tcl error [advertise]: no such channel record

Merci
Répondre


Messages dans ce sujet
erreur sur un tcl - par BrYcOu - 04/10/2015, 09:11
RE: erreur sur un tcl - par CrazyCat - 04/10/2015, 12:10
RE: erreur sur un tcl - par BrYcOu - 04/10/2015, 14:38
RE: erreur sur un tcl - par ZarTek - 04/10/2015, 14:49

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)
Tchat 100% gratuit - Discutez en toute liberté - Transitionnez vers Linux - Discussions dans le Lauragais - Communauté LGBT respectueuse - soutien aux victimes de cybermalveillance - pour les filles par les filles Le forum pour passer le temps