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

Pages: (2): « First « 1 [ 2 ] Last »
newb @ work...
Author: Message:
ins4ne
Veteran Member
*****

Avatar
...

Posts: 1015
Reputation: 38
37 / Male / Flag
Joined: Apr 2006
Status: Away
O.P. RE: nwwb @ work...
so guys... newb is back :'(... i got the same code as yesterday but today a bit modified. so i got that idea ;) its only for scripting training and meuh... dont talk about it, isnt very  important... so now my problem
code:
function OnEvent_MenuClicked(IdClicked)
{
if (IdClicked == "MnuAbout")
var Wnd = MsgPlus.CreateWnd("About.xml", "About");
else if (IdClicked == "MnuToast")
{
var Message == "Hello " + Messenger.MyName + ":)";
MsgPlus.DisplayToast("", Message, "notify.wav");
}
else if (IdClicked == "MnuSound")
var Wnd = MsgPlus.CreateWnd("Sound.xml", "Sound");
}
else if (IdClicked == "MnuGoogle")
var Wnd = MsgPlus.CreateWnd("Google.xml", "Google");
}

I got error on line 7...
quote:
Originally posted by Scriptdebugger
Fehler: ';' erwartet.
       Zeile: 7. Code: -2146827284.

This post was edited on 07-20-2006 at 03:47 PM by ins4ne.
[Image: b5c5bb366c94ba43283cc13901380e3e.png]
07-20-2006 03:25 PM
Profile PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: nwwb @ work...
I don't mean to sound rude, but do you ever read your own code? You've missed a brace yet again! These are things that reading your own code will pick up!
Forget it, the brace was ghiding behind the code tag you didn't close properly.

This post was edited on 07-20-2006 at 03:47 PM by RaceProUK.
[Image: spartaafk.png]
07-20-2006 03:38 PM
Profile PM Web Find Quote Report
ins4ne
Veteran Member
*****

Avatar
...

Posts: 1015
Reputation: 38
37 / Male / Flag
Joined: Apr 2006
Status: Away
O.P. RE: newb @ work...
what do you mean by that? where's the fault? make it bold please.
so where is the problem in that piece of code?

This post was edited on 07-20-2006 at 04:06 PM by ins4ne.
[Image: b5c5bb366c94ba43283cc13901380e3e.png]
07-20-2006 03:46 PM
Profile PM Find Quote Report
BstrdSmkr
Junior Member
**

Avatar
Earned. Never Given.

Posts: 46
39 / Male / –
Joined: Jul 2006
RE: newb @ work...
the problem is here:

var Message == "Hello " + Messenger.MyName + "(Smilie)";
MsgPlus.DisplayToast("", Message, "notify.wav");

it needs to be:

var Message = "Hello " + Messenger.MyName + "(Smilie)";
MsgPlus.DisplayToast("", Message, "notify.wav");

"==" is used to see if two things are already equal.  "=" is used to make one thing equal to another.

some times your request for help gets lost in the sea of other requests ;)   hope that helps!
07-20-2006 05:38 PM
Profile E-Mail PM Web Find Quote Report
ins4ne
Veteran Member
*****

Avatar
...

Posts: 1015
Reputation: 38
37 / Male / Flag
Joined: Apr 2006
Status: Away
O.P. RE: newb @ work...
oh dear... i will never get that... "==" is not "="... :'( thx anyway :)

EDIT: still an error... says in line 4 must be a ";" added...

This post was edited on 07-20-2006 at 05:43 PM by ins4ne.
[Image: b5c5bb366c94ba43283cc13901380e3e.png]
07-20-2006 05:40 PM
Profile PM Find Quote Report
BstrdSmkr
Junior Member
**

Avatar
Earned. Never Given.

Posts: 46
39 / Male / –
Joined: Jul 2006
RE: newb @ work...
ok, show what you have so far.
07-20-2006 06:28 PM
Profile E-Mail PM Web Find Quote Report
ins4ne
Veteran Member
*****

Avatar
...

Posts: 1015
Reputation: 38
37 / Male / Flag
Joined: Apr 2006
Status: Away
O.P. RE: newb @ work...
sorry... youre abit too late. markee helped me on WLM... he said "=" for variables and "==" when i want to say that something is equal another thing :). everything works nice now.
[Image: b5c5bb366c94ba43283cc13901380e3e.png]
07-20-2006 06:30 PM
Profile PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
RE: newb @ work...
Please READ your code... There are soo much errors :S

code:
function OnEvent_MenuClicked(MnuId)
{
  switch(MnuId)
  {
    case "MnuAbout":
      var Wnd = MsgPlus.CreateWnd("About.xml", "About");
      break;
    case "MnuToast":
      var Message = "Hello " + Messenger.MyName + ":D";
      MsgPlus.DisplayToast("Title", Message, "notify.wav");
      break;
    case "MnuSound":
      var Wnd = MsgPlus.CreateWnd("Sound.xml", "Sound");
      break;
    case "MnuGoogle":
      var Wnd = MsgPlus.CreateWnd("Google.xml", "Google");
      break;
  }
}

Also it's more usefull to use a switch instead of lots of else if.

And there is no real use in using so much xml files, just use one and put all the windows in there.
[Image: 1-0.png]
             
07-20-2006 06:31 PM
Profile PM Web Find Quote Report
ins4ne
Veteran Member
*****

Avatar
...

Posts: 1015
Reputation: 38
37 / Male / Flag
Joined: Apr 2006
Status: Away
O.P. RE: newb @ work...
ok. if you explain me how to do that i will :)

This post was edited on 07-20-2006 at 06:36 PM by ins4ne.
[Image: b5c5bb366c94ba43283cc13901380e3e.png]
07-20-2006 06:35 PM
Profile PM Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« Next Oldest Return to Top Next Newest »


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