quote:
Originally posted by Gropfi
what is wrong in this?
code:
var hi = 'Hi +Origin (:'
var hi = 'Hi
' +Origin
+ '(:'
;
Origin is a variable. The rest is text (and thus must be enclosed in parenthesis).
Also don't forget to end each line with ";".
quote:
Originally posted by Gropfi
code:
ChatWnd.SendMessage('Hi '+Origin (: );
ChatWnd.SendMessage('Hi '+ Origin
+ '(:
');
same reason as above.
quote:
Originally posted by Gropfi
code:
if (Message.substr(0,2) "morgen") {
and similar lines
if (Message.substr(0,
6)
== "morgen") {
You make a comparisson, so you need a comparisson operator between the two.
substr() is a function which takes a substring out of a given string. The syntax is
substr(start,end). Since the length of "morgen" is 6 characters you need to specify to get the first 6 characters in the substr function which is done by substr(0, 6).
quote:
Originally posted by H-Des
It came in a loop when I tested it by using 2 msn accounts at the same pc. But I didn't test it on another pc.
It should have exactly the same outcome.
To avoid looping use regular expressions like
RacePROuk showed. And with regular expressions you can also do what markee showed using an array btw.