Blockland Forums > Modification Help

My chatbot is not working

Pages: (1/23) > >>

Deoxys And One Noob:

Obiously, the chatbot script did not work. I used ThinkInvisables tutorial. I followed every step.

Here is the script.

If possible, please give me the CORRECT codeing.

Thank you.

Anyways, here is the script

client.cs:

//Made By Deoxys & One Noob, BLID 30436

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

OK, thats the client.cs

description.txt:

"NoobBot, Deoxys & One Noobs cool chatbot"

Thats it.

Tell me correct code please.

BYW, I DONT have RTB.

Brian Smithers:

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.

FFSO:

lol description.txt is failed too

Wordy:


--- Quote from: FFSO on March 09, 2012, 05:47:02 PM ---lol description.txt is failed too

--- End quote ---
What? What do you mean?


--- 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,%fmsg)
   {
      parent::clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%fmsg);
      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 ---
Where has %msg came from? isn't it supposed to be %fmsg?

Well confused.


Brian Smithers:

Fixed

Pages: (1/23) > >>

Go to full version