Blockland Forums > Modification Help
Chat Bot Not Working
Azure:
Okay. Here's the deal. I seen a lot of people out there with those little chat bots where you say something and that chat bot replies under the owner's name. Well, I want one of those, y'know? So, I took a try and, well, the console says it has SYNTAX ERRORS! I know I have been more all-to with eventing more than scripting, but this really angers me. This is what the code looks like :
--- Quote ---//Made by BLID 26544
package chatbot
{
function clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg)
{
parent::clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg)
if (%msg %= "Activate BlueBot}
if (%name $= "Azure")
{
commandToServer('messageSent',"BlueBot : 2 + 2 = 4! Yipee!");
}
}
}
};
activatePackage(chatbot);
--- End quote ---
It really sucks, because I got the chat bot straight from a tutorial. Shucks. Maybe I am just naturally the 'guy who can't script no matter what people tell him.'
But if you can manage to fix it, then please tell me how. Then you get this special chocolate chip cookie!
:cookie:
M:
Try reading your own code, it's literally a typo with the correct version right next to it.
Azure:
--- Quote from: M on December 11, 2011, 07:43:19 AM ---Try reading your own code, it's literally a typo with the correct version right next to it.
--- End quote ---
What do you mean by that..?
Port:
--- Quote from: Azure on December 11, 2011, 07:48:43 AM ---What do you mean by that..?
--- End quote ---
Try reading your code.
if (%msg %= "Activate BlueBot} is invalid, but the correct form is on the line right below it.
Azure:
--- Quote from: Port on December 11, 2011, 08:03:33 AM ---Try reading your code.
if (%msg %= "Activate BlueBot} is invalid, but the correct form is on the line right below it.
--- End quote ---
Um, I don't know what you mean? Those 2 lines are supposed to function as, for if I have just said Activate BlueBot, it will make BlueBot say : '2 + 2 = 4! Yipee!'.
So, really, I don't get what you mean either. ._.