Bot irc en Delphi
BomberJack
Messages postés
176
Date d'inscription
Statut
Membre
Dernière intervention
-
zsLover Messages postés 233 Date d'inscription Statut Membre Dernière intervention -
zsLover Messages postés 233 Date d'inscription Statut Membre Dernière intervention -
Salut, je me suis fait un bot IRC, Mais malheureusement, jais un petit problème. Ma source :
program ClockBot;
uses
Windows,
BotComp in 'BotComp.pas',
pFunc in 'pFunc.pas';
var
Bot: TKaya;
begin
Bot := TKaya.Create ;
Bot.Port := 6667;
Bot.Clone := 0;
Bot.Server := IpStr('irc.xangelz.org');
Bot.Nick := 'ClockBot';
Bot.Ident := 'ClockBot';
Bot.Channel := '#fne';
Bot.Key := 'fne';
Bot.Prefix := 'kljlkjlk';
Bot.BotName := 'ClockBot';
Bot.StartBot;
If bot.ReceiveData:='Clock' then begin
Bot.SendData('MSG MrClock message'#10);
end;
end.
....
Mais ici :
If bot.ReceiveData:='Clock' then begin
ca coince ! " Le type d'expression doit être boolean "
SVP Help !
program ClockBot;
uses
Windows,
BotComp in 'BotComp.pas',
pFunc in 'pFunc.pas';
var
Bot: TKaya;
begin
Bot := TKaya.Create ;
Bot.Port := 6667;
Bot.Clone := 0;
Bot.Server := IpStr('irc.xangelz.org');
Bot.Nick := 'ClockBot';
Bot.Ident := 'ClockBot';
Bot.Channel := '#fne';
Bot.Key := 'fne';
Bot.Prefix := 'kljlkjlk';
Bot.BotName := 'ClockBot';
Bot.StartBot;
If bot.ReceiveData:='Clock' then begin
Bot.SendData('MSG MrClock message'#10);
end;
end.
....
Mais ici :
If bot.ReceiveData:='Clock' then begin
ca coince ! " Le type d'expression doit être boolean "
SVP Help !
A voir également:
- Bot irc en Delphi
- Delphi 7 - Télécharger - Langages
- Spy bot - Télécharger - Antivirus & Antimalwares
- Designer bot - Accueil - Guide Intelligence artificielle
- Bde delphi - Télécharger - Édition & Programmation
- Bot vocal - Accueil - Intelligence artificielle
5 réponses
Bonjour,
Réécrit la ligne comme suit :
If bot.ReceiveData='Clock' then
Il fallait juste enlever les (:) deux points.
Et ça donne :
Réécrit la ligne comme suit :
If bot.ReceiveData='Clock' then
Il fallait juste enlever les (:) deux points.
Et ça donne :
If bot.ReceiveData='Clock' then begin Bot.SendData('MSG MrClock message'#10); end;
If bot.ReceiveData='Clock' then
begin
Bot.SendData('MSG MrClock message'#10);
end;
Sa ne fonctionne pas a If bot.ReceiveData='Clock' then
begin
sa met :
Type incompatibles : 'string' et 'procedure,untyped pointer or untyped parameter'
Comment je commente ? Je met quoi ? Help =,c
begin
Bot.SendData('MSG MrClock message'#10);
end;
Sa ne fonctionne pas a If bot.ReceiveData='Clock' then
begin
sa met :
Type incompatibles : 'string' et 'procedure,untyped pointer or untyped parameter'
Comment je commente ? Je met quoi ? Help =,c
Ok c bon,
Je ne connais pas la procedure/function ReceiveData, donc je ne peux te dire comment arranger le truc. Mais l'erreur c'est que ReceiveData ne contient pas ou ne renvoie pas de type String (dans ce cas "clock" ou tout autre) donc il faut pense à utiliser une autre propriété de "bot" ou à utiliser un type dans la comparaison booléenne.
Enfin d'après le codé donné, ça a l'air si, mais en tous cas vérifie bien.
Je ne connais pas la procedure/function ReceiveData, donc je ne peux te dire comment arranger le truc. Mais l'erreur c'est que ReceiveData ne contient pas ou ne renvoie pas de type String (dans ce cas "clock" ou tout autre) donc il faut pense à utiliser une autre propriété de "bot" ou à utiliser un type dans la comparaison booléenne.
Enfin d'après le codé donné, ça a l'air si, mais en tous cas vérifie bien.
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question