I've read through the documentation, but I can't find a clear example of what I want.
I type /hello something and then it runs the function hello and the variable words are assigned "something"
so, /hello starts the command, I know how to do that, but I'm confused by the example.
I have the following in a seperate JS file:
code:
function TestCommand(Wnd, Params)
{
Debug.Trace("TestCommand has been called");
var array = VBArray(Params).toArray();
for(i = 0; i < array.length; i++)
Debug.Trace(" Parameter: " + array[i]);
return "";
}
But when I type "/TestCommand fhfhf" it says TestCommand doesn't exist? Have I broken it some how?
I'm rather in a muddle. I have the script doing what I want, it's just setting it up so /script VARIABLE works.