What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Syntax error?

Syntax error?
Author: Message:
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: Syntax error?
First, this is how the script should be:
jscript code:
function OnEvent_Initialize(MessengerStart)
{
    MsgPlus.LockMessenger(true);
}

Now for an explanation :P

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 :P)
04-09-2009 10:02 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Syntax error? - by Quantum on 04-09-2009 at 09:32 PM
RE: Syntax error? - by matty on 04-09-2009 at 09:59 PM
RE: Syntax error? - by Quantum on 04-09-2009 at 10:01 PM
RE: Syntax error? - by Eljay on 04-09-2009 at 10:02 PM
RE: Syntax error? - by Quantum on 04-09-2009 at 10:06 PM
RE: Syntax error? - by matty on 04-09-2009 at 10:07 PM
RE: Syntax error? - by Eljay on 04-09-2009 at 10:12 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On