| Blockland Forums > Modification Help |
| Guide to Scripting/Chatbot Tutorial 2.0 -For the inexperienced. |
| << < (12/12) |
| ThinkInvisible:
--- Quote from: alex dude on February 14, 2011, 05:30:37 PM ---Hm, I seem to get no syntax errors but it does not seem to respond to the messages as i say them --- End quote --- You do not need to have two parents Whoa, that came out wrong. Fix: You do not need to have two Parent structures, or two Functions, in the package. Just multiple If structures. Also, the parent and function should be clientCmdChatMessage or whatever, not whatever you want. --- Code: ---package blah { function clientCmdChatMessage(stuff) { parent::blablabla; if(%msg $= "Hi") { event 1 } if (%msg $= "Haider") { event 2 } } }; activatePackage(blah); --- End code --- |
| alex dude:
--- Quote from: ThinkInvisible on February 14, 2011, 07:03:45 PM ---You do not need to have two parents Whoa, that came out wrong. Fix: You do not need to have two Parent structures, or two Functions, in the package. Just multiple If structures. Also, the parent and function should be clientCmdChatMessage or whatever, not whatever you want. --- End quote --- Ah, thanks; I understand now. |
| Navigation |
| Message Index |
| Previous page |