Blockland Forums > Modification Help

Guide to Scripting/Chatbot Tutorial 2.0 -For the inexperienced.

Pages: << < (6/12) > >>

otto-san:


--- Quote from: alex dude on February 04, 2011, 11:21:47 PM ---It's the msg 123 according to the console, i don't see what's wrong with it.

--- End quote ---

--- Quote from: otto-san on February 04, 2011, 11:19:07 PM ---The local variable %msg does not exist. (change the second %fmsg to %msg)

--- End quote ---


alex dude:


--- Quote from: otto-san on February 04, 2011, 11:26:19 PM ---

--- End quote ---
So change

--- Quote ---// Think Invisible's Code

package chatbot {
function clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%fmsg) {
parent::clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%fmsg)
  if (%msg $= "123") {
  if (%name $= "Alex_Dude") {
commandToServer('messageSent',"Your testing is win!");
     }
}
--- End quote ---
to

--- Quote ---// Think Invisible's Code

package chatbot {
function clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%fmsg) {
parent::clientCmdChatMessage(%a,%b,%c,%msg,%cp,%name,%cs,%msg)
  if (%msg $= "123") {
  if (%name $= "Alex_Dude") {
commandToServer('messageSent',"Your testing is win!");
     }
}
--- End quote ---
?

otto-san:


--- Code: ---package chatbot {
function clientCmdChatMessage(%a,%b,%c,%fmsg,%cp,%name,%cs,%msg) {
parent::clientCmdChatMessage(%a,%b,%c,%msg,%cp,%name,%cs,%msg)
  if (%msg $= "123") {
  if (%name $= "Alex_Dude") {
commandToServer('messageSent',"Your testing is win!");
     }
}
--- End code ---

you change both.

alex dude:

Nevermind, i got it :D

otto-san:

congratulations

Pages: << < (6/12) > >>

Go to full version