RE: [HELP] Messenger.MyPersonalMessage won't assign to variable?
You've got the variable wrong it isn't outputing anything because you're initializing it inside OnEvent_ChatWndSendMessage() function... if you put it like this it should work:
[code]
var MyOldPM;
function OnEvent_ChatWndSendMessage( ChatWnd, Message )
{
chat_window = ChatWnd;
Command = Message.split(' ')
switch ( Command[0].toLowerCase() )
{
case "/testing" :
var i = 0;
MyOldPm = Messenger.MyPersonalMessage;
MsgPlus.AddTimer("testing", 1000 );
Message = '';
return "";
break;
default:
}
return Message;
}
function OnEvent_Timer( TimerId )
{
switch( TimerId )
{
case 'cuptime':
i++
if(i < 60){
Messenger.MyPersonalMessage = "Timing... " + i + " Minutes have passed";
MsgPlus.AddTimer( 'cuptime', 60000 );
}else{
Messenger.MyPersonalMessage = MyOldPM;
}
break;
default:
}
}
[code]
EDIT: you also got the variable name wrong you've got The in one and My on another! Hope this works...
This post was edited on 08-10-2007 at 12:51 AM by GNSPS.
|