Problem about Send to Execute

Posted by Lidi on Sat 10 Sep 2005 06:19 AM — 4 posts, 19,610 views.

China #0
Alias: test
Send to Execute:
/Note("test")
say test

It cannot work.
Help!
USA #1
What doesn't work about it?

Do you have scripting enabled (which language)?
China #2
I am using lua.
Script Error:
[string "Command line"]:2: `=' expected near `test'
Australia Forum Administrator #3
When you execute a command starting with the scripting prefix (ie. / in this case) then the entire command is considered a script, not just the first line. Thus "say test" is not a valid Lua statement.

You get the same effect if you enter a multi-line command in the command window, pressing Ctrl+Enter to start new lines. You only have to put "/" at the very start, and can have multi-line script statements in it.

To do what you are trying to do, try this:


/Note("test")
Send ("say test")


However then you may as well "send to script" and leave out the "/" on the first line.

Send to Execute is intended really to let you re-process aliases (or speedwalks). Eg. if "foo" is an alias, then doing this:


Alias: bar
Send to: execute
Send: foo


... would evaluate the alias "foo", whereas just send to world would simply send "foo", not what the alias turned it into.