What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [split] What scripts can't do.

[split] What scripts can't do.
Author: Message:
waterbottle
New Member
*


Posts: 6
Joined: Dec 2006
O.P. RE: [split] What scripts can't do.
hmm,
I've been trying to get the charCodeAt function working. However it just dosn't want to.

I copied out of the example, but it gives me the same result everytime I choose a letter (upper or lowercase makes no difference) or anything else other than numbers. I also tried adding other signs to the string, str, (lowercase alphabet, numbers). But that only increases the size of the number it returns.

the number I get with the code copied out of the example is 65. if the char I send is a number it returns '65 + n'.

heres the code I have,

code:
function charCodeAtTest( n ){

  var str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; //Initialize variable.

   return str.charCodeAt(n - 1);  //Return Unicode value of the character.

}


function OnEvent_ChatWndSendMessage(ChatWnd,Message)
{
    return '' + charCodeAtTest(Message.charAt(0));
}


Anyone know what I'm doing wrong? :)
12-15-2006 10:30 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread


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