Pb d'import/export avec les namespace
#5
soit tu l'appelles par $monscript::test, soit tu mets une ligne variable test au début de chaque procédure qui utilise la variable afin de l'importer et de pouvoir l'appeler $test ensuite :

TCL
namespace eval monscript {
   variable test "un test"
   bind pub - !test monscript::test
 
   proc test { nick host handle chan args } {
     putserv "privmsg $chan :$monscript::test"
   }
}


ou
TCL
namespace eval monscript {
   variable test "un test"
   bind pub - !test monscript::test
 
   proc test { nick host handle chan args } {
     variable test
     putserv "privmsg $chan :$test"
   }
}


Répondre Avertir


Messages dans ce sujet
RE: Pb d'import/export avec les namespace - par MenzAgitat - 03/02/2010, 10:46

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)
Tchat 100% gratuit -Discutez en toute liberté