Erreur de TCL --'
#1
[font=Tahoma]Bonsoir la compagnie!

Voilà j'ai "essayer" de crée un tcl, qui permet de faire en sorte que quand je fait rejoindre mon egg sur un chan avec le (.+chan #salon) en Partyline, il le dise sur un salon défini! mais il prend aussi en compte les users pas que lui, pourtant j'ai mis "if {$nick==$botnick} {" Hum ?!

tcl
putlog "Evenements PinTaDoz - Chargée"
set chanlogfirst "#Pintadoz"
 
proc putspeed {arg} {
	putquick "$arg"
	clearqueue all
	return $arg
}
 
 
bind join - * joinbotchan
proc joinbotchan {nick uhost hand arg} {
global botnick join
if {$nick==$botnick} {
putspeed "PRIVMSG $::chanlogfirst :× 3Join Service 1× Je vien de rejoindre le salon $chan - Par $nick"
}
}
 
bind part - * xpartbotchan
proc xpartbotchan {nick uhost hand arg} {
global botnick part
if {$nick==$botnick} {
putspeed "PRIVMSG $::chanlogfirst :× 4Part Service 1× Je vien de partir du salon $chan - Par $nick"
}
}



Mais problème ! J'ai des messages d'erreurs:

Au Join: Tcl error [joinbotchan]: can't read "chan": no such variable
Au Part: Tcl error [xpartbotchan]: wrong # args: should be "xpartbotchan nick uhost hand arg"

Pouvez-vous m'aidez ? Sy vous plaît :s

Amicalement,
IluZi0n[/font]
BlueIRC.fr - Serveur de t'Chat IRC Wink
http://www.BlueIRC.fr
Répondre Avertir
#2
Tu veux utiliser $chan alors que tu ne l'a pas mit dans les arguments de tes procédures, donc forcément ca ne va pas aller.

essai avec ça:

tcl
putlog "Evenements PinTaDoz - Chargée"
set chanlogfirst "#Pintadoz"
 
proc putspeed {text} {
   putquick "$text"
   clearqueue all
   return $text
}
 
 
bind join - * joinbotchan
proc joinbotchan {nick uhost chan text} {
global botnick
if {$nick==$botnick} {
putspeed "PRIVMSG $::chanlogfirst :× 3Join Service 1× Je vien de rejoindre le salon $chan - Par $nick"
}
}
 
bind part - * xpartbotchan
proc xpartbotchan {nick uhost chan text} {
global botnick
if {$nick==$botnick} {
putspeed "PRIVMSG $::chanlogfirst :× 4Part Service 1× Je vien de partir du salon $chan - Par $nick"
}
}



j'ai fait quelques corrections. J'ai rajouté le chan dans les arguments des procédures et remplacé les arg par des text (simple préférence, vaux mieux t'y habituer).
Ensuite, je vois pas pourquoi tu appelle join et part dans tes global, alors qu'aparemment tu n'utilise aucune variable portant ce nom.

Je pense que cela devrai aller, si je dit des bêtises, et des choses erronées, je demande aux membres plus expérimentés que moi de me corriger.

_______________________________________________________
BlackNight - Si tu ne sais pas, apprends. Si tu sais, partages. [Socrate]
Répondre Avertir
#3
[font=Tahoma]Hello,


Bon j'ai modifier comme tu m'a dit, mais j'ai toujours l'erreur pour le part... et le join donne:

Citation :(18:55:56) ‹@PinTaDoz› × Join Service × Je vien de rejoindre le salon * - Par PinTaDoz

Il met "*" pour le salon --' normalement il devrait affiché le salon qu'il rejoint ? & J'ai toujours l'erreur "[19:57] Tcl error [xpartbotchan]: wrong # args: should be "xpartbotchan nick uhost chan text"" si je part du salon moi même... alors que normalement il devrait le faire QUE pour lui.

Amicalement,
IluZi0n[/font]
BlueIRC.fr - Serveur de t'Chat IRC Wink
http://www.BlueIRC.fr
Répondre Avertir
#4
L'erreur est en gras
tcl
bind join - * joinbotchan
proc joinbotchan [b]{nick uhost hand arg}[b] {
global botnick join
if {$nick==$botnick} {
putspeed "PRIVMSG $::chanlogfirst :× 3Join Service 1× Je vien de rejoindre le salon $chan - Par $nick"
}
}



Il ne faut pas oublier que la syntax est :
tcl
proc une:proc [b]{nick uhost handle chan arg}[b] {


Répondre Avertir
#5
[font=Tahoma]Bonsoir,

Bon j'ai modifier comme tu m'a dit, merci, j'ai l'erreur suivante des que je fait un .+chan #salon

Citation :Tcl error [joinbotchan]: wrong # args: should be "joinbotchan nick uhost handle chan arg"

Et pour le .-chan #salon

Citation :‹@PinTaDoz› × Part Service × Je vien de partir du salon #aa - Par PinTaDoz

Il met son pseudo et pas le mien x)

Cordialement,[/font]
BlueIRC.fr - Serveur de t'Chat IRC Wink
http://www.BlueIRC.fr
Répondre Avertir


Atteindre :


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