Try this instead
code:
function OnEvent_ChatWndReciveMessage(ChatWnd, Origin, Message, MessageKind){
if(Origin == Messenger.MyName){return;}
else{
for(i=0;i<2;i++){
if(LIST[i] == Message){
ChatWnd.SendMessage("Duja");
Debug.Trace("Duja detected");
break;
}
}
}
}
This should work for you now, just had to fix the 'for' line