Shoutbox

Contact.Name = 1? - 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: Contact.Name = 1? (/showthread.php?tid=67569)

Contact.Name = 1? by Spunky on 10-22-2006 at 01:45 PM

I'm working on a script and need to put names into a list view box. I want an option to only display online contacts. So I created this code:

quote:
function populateContacts(who){
    Debug.Trace(who);
        for(i = pollWindow.LstView_GetCount('List1');i>=0;i--){
            pollWindow.LstView_RemoveItem("List1",i);
        }
    i=0;
    var Contacts = Messenger.MyContacts;
    var e = new Enumerator(Contacts);
    for(; !e.atEnd(); e.moveNext()) {
    var Contact = e.item();
            if(who==="all"){
                pollWindow.LstView_AddItem("List1",Contact.Email,i);
                pollWindow.LstView_SetItemText("List1",i,1,Contact.Name);
                i++;
            }else if(who==="online"&&Contact.Status>2){
                    pollWindow.LstView_AddItem("List1",Contact.Email,i);
                    pollWindow.LstView_SetItemText("List1",i,1,Contact.Name);
                    if(pollWindow.LstView_GetItemText("List1",i,1)==="1")Debug.Trace("error: "+i+": "+Contact.Name);
                    i++;
            }
    }
        pollWindow.SetControlText("lbl_num","0 / "+i+" Contacts Selected");
}

My problem is that certain contacts ALWAYS have the name shown as "1" and I don't understand why. I though it might be a script problem, but I've seen signout message saying "1 has signed out".

It always happens when i = one of these numbers:

0
2
3
4
8
10
11
12

Can someone please tell me if it's a script error or something dodgy with my Messenger Plus! please?

PS: Would have indented, but still looks wierd and just as hard to read
RE: Contact.Name = 1? by Felu on 10-22-2006 at 01:50 PM

Its an old error with MSN Protocol 14(Yahoo! Compatibility) and was supposed to be fixed in this public version of WLM. I've never got this before with this version of Plus!(4.01.0.240) though the version before this had this as hell. You can do nothing about it [Image: msn_sad.gif].


RE: Contact.Name = 1? by Spunky on 10-22-2006 at 02:11 PM

Thing is though, it works when adding all contacts to my PSM+ script ^o) Would it only be for certain scripts?