Blockland Forums > Modification Help

My chatbot is not working

Pages: << < (2/23) > >>

Deoxys And One Noob:


--- Quote from: Brian Smithers on March 09, 2012, 05:44:01 PM ---There was so many things wrong with that I can't describe
though heres a fixed version


package chatbot
{
   function clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg)
   {
      parent::clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg);
      if(%msg $= "NoobBot")
      {
         if(%name $= "Deoxys & One Noob")
         {
            commandToServer('messageSent', "What a cool chatbot!");
         }
      }
   }
};
activatePackage(chatbot);

Try to make it spacier
also no ' around any package or function thing.

--- End quote ---

OK, copy and pasted the code, what now? I typed "NoobBot" and nothing happened

Brian Smithers:


--- Quote from: Deoxys And One Noob on March 09, 2012, 05:58:07 PM ---OK, copy and pasted the code, what now? I typed "NoobBot" and nothing happened

--- End quote ---
any console messages?

Deoxys And One Noob:


--- Quote from: Brian Smithers on March 09, 2012, 05:59:03 PM ---any console messages?

--- End quote ---

Yep, tried activatePackage(chatbot); and activatePackage(client_MyFirstBot);

Brian Smithers:


--- Quote from: Deoxys And One Noob on March 09, 2012, 06:00:00 PM ---Yep, tried activatePackage(chatbot); and activatePackage(client_MyFirstBot);

--- End quote ---
I mean do you get any errors in console?

Deoxys And One Noob:


--- Quote from: Brian Smithers on March 09, 2012, 06:01:58 PM ---I mean do you get any errors in console?

--- End quote ---
When i tryed the activatePackage(chatbot);, it said that there it could not find a package named "chatbot"

When I tryed the other one, It found the file, but it said there was a syntax error.

Pages: << < (2/23) > >>

Go to full version