| Blockland Forums > Modification Help |
| Client Script Error and CONSOLE error detect doesn't help! |
| (1/2) > >> |
| frogger3140:
This will be a private mod: --- Code: ---warn("Loading FrogBT v0.0.1 (Unstable)"); package FrogBT function clientcmdChatMessage(%client,%b,%c,%all,%PreTag,%name,%postTag,%msg) { if(striPos(%msg,"@about") >= 0) commandtoserver('messagesent', "FrogBT v0.0.1 Patch 2: Made by Frogger3140"); } if(striPos(%msg,"@cake") >= 0) commandtoserver('messagesent', "You," SPC %name @ ", deserve" SPC getrandom(10, 99) SPC "cakes!"); } if(striPos(%msg,"@help") >= 0) commandtoserver('messagesent', "FrogBT Commands: @about: About FrogBT. @help: FrogBT Help. @cake: CAKE."); commandtoserver('messagesent', "FrogBT Math: COMING SOON"); } parent::clientcmdChatMessage(%client,%b,%c,%all,%PreTag,%name,%postTag,%msg); } }; activatepackage(FrogBT); echo("FrogBT Load Success!"); --- End code --- CONSOLE log attached |
| phflack:
you have 4 more } than {, console said you have a syntax error, and i agree with it try --- Code: ---warn("Loading FrogBT v0.0.1 (Unstable)"); package FrogBT { function clientcmdChatMessage(%client,%b,%c,%all,%PreTag,%name,%postTag,%msg) { if(striPos(%msg,"@about") >= 0) commandtoserver('messagesent', "FrogBT v0.0.1 Patch 2: Made by Frogger3140"); if(striPos(%msg,"@cake") >= 0) commandtoserver('messagesent', "You," SPC %name @ ", deserve" SPC getrandom(10, 99) SPC "cakes!"); if(striPos(%msg,"@help") >= 0) { commandtoserver('messagesent', "FrogBT Commands: @about: About FrogBT. @help: FrogBT Help. @cake: CAKE."); commandtoserver('messagesent', "FrogBT Math: COMING SOON"); } parent::clientcmdChatMessage(%client,%b,%c,%all,%PreTag,%name,%postTag,%msg); } }; activatepackage(FrogBT); echo("FrogBT Load Success!"); --- End code --- i'm not sure how packages work, but for the rest of it, it should work |
| frogger3140:
Thanks, now the problem is that it's not detecting the commands! --- Code: ---warn("Loading FrogCM v0.0.2 (Unstable)"); package FrogCM { function clientcmdChatMessage(%client,%b,%c,%all,%PreTag,%name,%postTag,%msg) { if(strstr(%msg,"@about") == 1) commandtoserver('messagesent', "FrogCM v0.0.2: Made by Frogger3140. Fixed by phlack and Frogger3140."); if(strstr(%msg,"@cake") == 1) commandtoserver('messagesent', "You," SPC %name @ ", deserve" SPC getrandom(10, 99) SPC "cakes!"); if(strstr(%msg,"@help") == 1) { commandtoserver('messagesent', "FrogCM Commands: @about: About FrogCM. @help: FrogCM Help. @cake: CAKE."); commandtoserver('messagesent', "FrogCM Math: COMING SOON"); } parent::clientcmdChatMessage(%client,%b,%c,%all,%PreTag,%name,%postTag,%msg); } }; activatepackage(FrogCM); echo("FrogCM Load Success!"); --- End code --- |
| phflack:
package might need a (), like a function, although i'm not sure try taking out the package, and just leaving the function there |
| Sniper4hire:
if(%msg $= "@about") |
| Navigation |
| Message Index |
| Next page |