quote:
Originally posted by Jimbodude
Sorry, i forgot i couldn't put ' after a return
use this instead:
code:
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
if (Message.substr(0, 4)== "test"){
return'test1'
}
if (Message.substr(0, 4) == "cant"){
return'can"t'
}
if (Message.substr(0, 4) == "dont"){
return'don"t'
}
}
Use nanafreak's code, the code above is verbose and unneccesarily long when you are working with alot of words and its biggest disadvantage is that it only parses the word if it is the first thing that is typed (and also only does one word).
ie 'dont' will get changed into 'don't'
but if you typed 'hello!! hey, dont do that', it will not be parsed.