Execute, aliases, and newlines

Posted by Fiendish on Fri 01 Apr 2011 11:30 AM — 2 posts, 7,789 views.

USA Global Moderator #0
I construct an alias called "myalias" that sends some things to the world, for example like so:

get badge bag
wear badge
enter
wear amulet
run sw
put badge bag


So then (with script prefix \\)...

\\Execute("myalias;run 3w")
works with ";" as my command stack char. It executes myalias and then runs 3w.
\\Execute("run 3e\nrun 3w")
works as well, running 3e and then running 3w.
\\Execute("myalias\n")
also works, executing myalias.

But,
\\Execute("myalias\nrun 3w")
does not work. It tries to send "myalias" to the mud without executing it and then runs 3w.
Amended on Fri 01 Apr 2011 12:23 PM by Fiendish
Australia Forum Administrator #1
Well I see the problem. The documented behaviour of breaking up what you type into lines, and then processing them individually, depends on breaking on the \r\n sequence (which is what it normally gets when you type into the edit control).

However you manually inserted a newline without a carriage-return. Thus it ended up with the two-line sequence as a single command, which was not recognized as an alias.

I think I would have to agree this is a bug, and it will be fixed in version 4.73.