Syntax error? - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: Syntax error? (/showthread.php?tid=90085) Syntax error? by Quantum on 04-09-2009 at 09:32 PM
Well i wanted my messenger to lock when messenger starts. So i wanted to make the script myself and then see if i could do it (it's really easy with the doc's after you read it). code: But somethings wrong with line 5? I don't seem to notice what it is. Can anyone help by explaining what's wrong as well has telling me whats wrong. It's a syntax error that was like that in the doc. Also, can boolean be only true or false? RE: Syntax error? by matty on 04-09-2009 at 09:59 PM
Yeah because you are using the function all wrong. js code: And yes a boolean is either true or false nothing else. RE: Syntax error? by Quantum on 04-09-2009 at 10:01 PM
Oh, i see RE: Syntax error? by Eljay on 04-09-2009 at 10:02 PM
First, this is how the script should be: jscript code: 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: 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: 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: (note: I noticed matty already posted before I submitted this, but it took a while to type so fuck it ) RE: Syntax error? by Quantum on 04-09-2009 at 10:06 PM So whenever i use a function i need to use it with and object? (Like MsgPlus or Messenger)? RE: Syntax error? by matty on 04-09-2009 at 10:07 PM Yes RE: Syntax error? by Eljay on 04-09-2009 at 10:12 PM
quote: Yes, but some of the objects are global such as Messenger and MsgPlus, whereas some have to be returned by another method such as ChatWnd or Contact. This is explained along with a list of which objects are/aren't global in the "Objects Reference" page of the Scripting Docs. |