What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [HELP] Variable assignment error

[HELP] Variable assignment error
Author: Message:
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
O.P. [HELP] Variable assignment error
Hi,

I'm constantly anoyed by an error as I try to assign a varable:

code:
function OnWndOptEvent_CtrlClicked(PlusWnd,ControlId) {
    if(ControlId == "BtnOK") {
        Key = "HKEY_CURRENT_USER" + BackSlash + "Software" + BackSlash + "Microsoft" + BackSlash + "MSNMessenger" + BackSlash + "PerPassportSettings" + BackSlash + Messenger.MyUserId + BackSlash + " DefaultSignInState", {
        Value = WndOpt.Combo_GetCurSel("CmbStatus"); // line 129
        Type = "REG_DWORD";
        RegWrite(Key,Value,Type);
    }
}


The debugger shows "error in line 129: ':' is expected".

In another script I use exactly the same method and it works.
Does Messenger have a bad day today?

Thanks in advance..
05-18-2008 07:53 PM
Profile PM Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
29 / Male / Flag
Joined: Nov 2006
Status: Away
RE: [HELP] Variable assignment error
code:
var Key, Value, Type;
function OnWndOptEvent_CtrlClicked(PlusWnd,ControlId) {
if(ControlId == "BtnOK") {
Key = "HKEY_CURRENT_USER\\Software\\Microsoft\\MSNMessenger\\PerPassportSettings\\" + Messenger.MyUserId + "\\DefaultSignInState";
Value = PlusWnd.Combo_GetCurSel("CmbStatus");
Type = "REG_DWORD";
RegWrite(Key,Value,Type);
}
}
should work now.
i don't think you could use strings as functions 8-)

either WndOpt (variable) isn't defined or on line 128:
code:
[...]"DefaultSignInState", {

This post was edited on 05-18-2008 at 09:27 PM by roflmao456.
[quote]
Ultimatess6
: What a noob mod
05-18-2008 08:30 PM
Profile PM Web Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [HELP] Variable assignment error
btw, instead of BackSlash, why don't you use "\\", it would make long lines like Key ="..." much more readable. ;)

This might have helped in seeing that that line of code had a syntax error which in the end resulted in the error message.

This post was edited on 05-18-2008 at 09:32 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
05-18-2008 09:15 PM
Profile PM Find Quote Report
SmokingCookie
Senior Member
****

Avatar

Posts: 815
Reputation: 15
30 / Male / Flag
Joined: Jul 2007
O.P. RE: [HELP] Variable assignment error
Because "\\" makes it confusing. I use Plus!'s script editor. Its colorization llows me to "detect" strngs that haven't been ended (like "hello; which misses a quote mark) and other stuff.

Example (note Key2):

[Image: screenieyy7.th.jpg]

And btw: it seems to work now, so thanks (again :$ :P )

This post was edited on 05-19-2008 at 04:50 PM by SmokingCookie.
05-19-2008 04:47 PM
Profile PM Find Quote Report
« 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