First, this is how the script should be:
jscript code:
function OnEvent_Initialize(MessengerStart)
{
MsgPlus.LockMessenger(true);
}
Now for an explanation
The way the function is represented in the Syntax section of the documentation isn't
really representative of the way you use the code.
quote:
Originally posted by Scripting Docs => MsgPlus::LockMessenger
Syntax
code:
LockMessenger(
[boolean] Lock
);
This is simply a form of IDL (Interface Definition Language), and is simply to inform developers of the parameters that a method takes and their types.
These functions are actually called in the following format:
code:
NameOfObject.MethodName(param1, param2... paramn);
In this case, the object is MsgPlus, the method name is LockMessenger, and it takes one boolean parameter. Therefore, to lock Messenger it would be called like so: (repeat of above code)
jscript code:
function OnEvent_Initialize(MessengerStart)
{
MsgPlus.LockMessenger(true);
}
(note: I noticed matty already posted before I submitted this, but it took a while to type so fuck it )