What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Problem With String Lengths

Problem With String Lengths
Author: Message:
Master Jake
New Member
*

Haii

Posts: 7
32 / Male / Flag
Joined: Feb 2009
O.P. Problem With String Lengths
Hi! I'm trying to do something to change people's messages. I know I can only see it on my screen but I still want it cause its cool. This is what I have so far.

code:
var gayMessages = new Array("I'm Gay!", "Did you know I'm homosexual now?", "Yes, I finally came out of the closet.", "I know it's shocking, but I really am gay..!", "My life sucks now that I'm gay :(", "Please don't tell anyone I'm gay!!!", "Can I suck your weener?", "I wish I was as cool as you....");

function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind)
{
    if (Origin != Messenger.MyName)
    {
        Debug.Trace(Message);
       
        var randnum = Math.floor(Math.random()*gayMessages.length)
        Message = gayMessages[randnum];
        return Message;
    }
}


The problem with this? It only writes out as many characters of the new message as they originally typed. So if they type "hello" and it gets the message "I know it's shucking, but I really am gay..!" then it will only display "I kno" because thats 5 letters and their original message "hello" was 5 letters. I need it to display the whole, regardless.
02-12-2009 10:56 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Problem With String Lengths - by Master Jake on 02-12-2009 at 10:56 PM
RE: Problem With String Lengths - by pollolibredegrasa on 02-12-2009 at 11:21 PM
RE: Problem With String Lengths - by matty on 02-13-2009 at 04:19 AM


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