OK that problem is fixed but i've tried to add another command which changed your name back, heres my code.
code:
var OldName = "";
function OnEvent_Initialize(MessengerStart)
{
}
function OnEvent_Uninitialize(MessengerExit)
{
}
function OnGetScriptCommands(){
var commands = '<ScriptCommands>';
commands+='<Command>';
commands+='<Name>intstealname</Name>';
commands+='<Description>Steal your contacts name!</Description>';
commands+='<Parameters/>';
commands+='</Command>';
commands+='<Command>';
commands+='<Name>intoldname</Name>';
commands+='<Description>Change your name back to the previous name!</Description>';
commands+='<Parameters/>';
commands+='</Command>';
commands+='</ScriptCommands>';
return commands;
}
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
if(Message.substr(0,13) == "/intstealname")
{
OldName = Messenger.MyName;
var Contacts = ChatWnd.Contacts;
var e = new Enumerator(Contacts); for(; !e.atEnd(); e.moveNext())
var Blah = e.item()
Messenger.MyName = Blah.Name;
MsgPlus.DisplayToast("Interpreter 1.0", "You are now interpretating your contact!");
return '';
}
if(Message.substr(0,9) == "/intoldname")
{
if(OldName = ""){
MsgPlus.DisplayToast("Interpreter 1.0", "You dont have an old name!");
}else{
Messenger.MyName = OldName;
MsgPlus.DisplayToast("Interpreter 1.0", "Your name is back to normal!");
return '';
}
}
}
It comes up with the same error and the script is enabled.