SA-MP Forums Archive
ChatBot - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: ChatBot (/showthread.php?tid=358068)



ChatBot - JEkvall95 - 09.07.2012

I searched on ****** for how to make a chat bot and I found a tutorioal but I don't get it work. I made this filterscript

When I compile it I get this error:
Код:
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\filterscripts\spybot.pwn(4) : error 017: undefined symbol "random"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\filterscripts\spybot.pwn(6) : error 017: undefined symbol "SendClientMessageToAll"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\filterscripts\spybot.pwn(7) : error 017: undefined symbol "SendClientMessageToAll"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\filterscripts\spybot.pwn(8) : error 017: undefined symbol "SendClientMessageToAll"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\filterscripts\spybot.pwn(9) : error 017: undefined symbol "SendClientMessageToAll"
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\filterscripts\spybot.pwn(13) : warning 235: public function lacks forward declaration (symbol "OnGameModeInit")
C:\Users\Julius\Documents\Grand Theft Auto Servers\San Andreas\samp03e_svr_win32.zip\filterscripts\spybot.pwn(15) : error 017: undefined symbol "SetTimer"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
I followed this tutorioal
http://multimart.org/forums/index.php?topic=2559.0

Код:
forward SpyBot2();//We must forward our new call back BEFORE we declare it.
 public SpyBot2()
 {
 switch(random(4))//Switch a random number. Defualt (4) messages.
 {
 case 0: SendClientMessageToAll(-1, "BOT: Message 1");//If the case number is 1, send them this message.
 case 1: SendClientMessageToAll(-1, "BOT: Message 2");//If the case number is 2, send them this message.
 case 2: SendClientMessageToAll(-1, "BOT: Message 3");//If the case number is 3, send them this message.
 case 3: SendClientMessageToAll(-1, "BOT: Message 4");//If the case number is 4, send them this message.
 }
 return 1;
 }
 public OnGameModeInit()//Example is OnGameModeInit
 {
 	 SetTimer("ChatBOT", 60 * 1000, true);//Change 30 to the amount of seconds between messages from the bot.(Default: 30 secs)
 	 return 1;
 }



Re: ChatBot - Vince - 09.07.2012

pawn Код:
#include <a_samp>