Hey,
As most of you know i'm moderating the scripts DB, when adding new scripts i always check them out first. The thing i seem to run into more and more is that people don't use proper /commands, but they use their own ones that don't show up in the command helper or the make their commands case sensitive.
I always mail people back when things like that happen and tell them what's wrong and point them to where in the documentation they can find a solution for it. But is would be nice if there is an piece of example code that deals with
all the common /command problems and shows beginning devvers how its done and what they should look out for.
At the moment i have more than 20 new scripts waiting to be added and more are dripping in. I'm sure it takes me much longer to read through the documentation than it takes for an experienced scripter to write an nice example, so i ask your help
.
What am i looking for?
- Basically a example code that shows how to deal with all the aspects of /commands
- Well commented code, a beginning unexperienced coder should be able to understand why you do things the way you do it in the example
- How to add commands to the command helper, including description (OnGetScriptCommands)
- How to catch your commands (OnGetScriptCommands)
- Make commands case insensitive
- How to work with commands that include parameters (optional parameters / multiple parameters)
- How to add parameter info to the command helper
- other things that i forgot which people should know
Put the example together with all the comments in a .js and post in here in the topic, or maybe better, post it in a BBcode block so people can easily read it and improve if needed. Once we have a nice example i'll put it in a new sticky(+locked?) topic so i can point people to there in the future.
Thanks for helping out