Bot irc en Delphi

BomberJack Messages postés 247 Statut Membre -  
zsLover Messages postés 255 Statut Membre -
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 !


A voir également:
  • Bot irc en Delphi
  • Delphi 7 - Télécharger - Langages
  • Designer bot - Accueil - Guide Intelligence artificielle
  • Spy bot - Télécharger - Antivirus & Antimalwares
  • Bde delphi - Télécharger - Édition & Programmation
  • Bot vocal - Accueil - Intelligence artificielle

5 réponses

zsLover Messages postés 255 Statut Membre 17
 
Bonjour,
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; 
0
BomberJack Messages postés 247 Statut Membre 66
 
Type incompatibles : 'string' et 'procedure,untyped pointer or untyped parameter'

=,C SOS
0
zsLover Messages postés 255 Statut Membre 17
 
Bonjour,
Commente un peu plus !
0
BomberJack Messages postés 247 Statut Membre 66
 
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
0
zsLover Messages postés 255 Statut Membre 17
 
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.
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
BomberJack Messages postés 247 Statut Membre 66
 
Ajoute mon adresse msn, je t'envoie la source car je suis débutant en Delphi =,c *******@hotmail.fr
0
zsLover Messages postés 255 Statut Membre 17
 
OK c'est bon, retire-là maintenant (en modifiant le message).
0