Wish for variable specification character to be omitted from world input line

Posted by Daniel P on Mon 15 Dec 2008 06:47 PM — 8 posts, 31,293 views.

USA #0
As my scripting is being expanded and my lists of triggers, aliases, variables, etc. are growing to annoyingly large proportions, I'm running into a problem. The MUD, Achaea, has a feature called TMOTE'ing. It is possible to correct common grammar errors in the world by ending words like her with the "@" character for possessive and "^" for objective. Ex)"TMOTE gives Sally her@ book." In practicality, the @ symbol must be passed to the world as it is.

When I attempt to use this command, I get an error window "@ must be followed by a variable name." Also typing in any existing variable in the command line results in this error.

I've tried escaping the @ symbol - Ex) "TMOTE gives Sally her\@ book," but still results in the same error.

The next attempt created a new variable called "her" and could be called with @her, which works only in a script.

Is there a way to force MUSH to omit trying to add a variable to the command line (ie send the @ character to the world, rather than converting it to a variable)? I would think escaping the @ symbol should work, but I'm not sure my syntax is correct as shown above. Can someone clarify?

Thanks..

MUSHClient 4.37
LUA 5.x
Netherlands #1
I re-read your post three times, and I am not sure in what context you are talking.

If you mean you type the 'her@' command in the command-window, that should work just fine by default. Nothing is being expanded for me.

If you are talking about an alias/trigger that has its actions in the Send: field, you can try double backslashing. Eg. \\@

And If I am still not hitting the nail with my hammer, can you be a bit more precise about what is happening and how? :)
Australia Forum Administrator #2
If I understand you correctly, you want to use the @ character in an alias? The easiest thing is to NOT check "expand variables". Then the @ is not converted in any way. If you have to expand them for some reason you can double it, eg. @@ would send a single @.

See:

http://www.gammon.com.au/scripts/doc.php?dialog=IDD_EDIT_ALIAS

USA #3
Sorry I wasn't clear enough on what I'm trying to do exactly. My main goal is to send a string to the world directly from the command line, including the @ symbol for grammatical corrections in targetted emotes.

No aliases. No scripts. No nothing.

Simply play the game.

To clarify: the following does not include any scripting or aliases or anything. Just simply what I enter directly into the command line.

"TMOTE smiles at Sally and gives her@ book back."

Results in a window titled mushclient that says, "@ must be followed by a variable name."

Is there some global setting that attempts to expand all instances of the @ symbol and can I turn it off?

-Daniel



Netherlands #4
If such a setting exists, I am not finding it due to it being hidden very well. :)

Do you have any plugins loaded? Global plugins maybe that load for every world?

Edit: So I figured I should dive into the source to see if I could locate the problem. And I can say (unless the code has a really weird thought pattern behind it) that you must be causing an alias to fire somehow. It is either an alias, a trigger, or some MXP stuff in the display routine. The latter two seem impossible from the get-go, so I've been trying to craft an alias that might somehow fire and cause your problem. And I've failed utterly so far - that is assuming said alias fires for every conceivable line rather than just the ones with a @ in it.. :)

Please try turning Trace on (you can find it in the Game menu, or can press Ctrl+Alt+T), and then execute your command once again. My suspicion is that you'll find an alias firing after all.. output along the lines of...

TRACE: Matched alias "^(.*)@(.*)$"


.. will show up right as the dialogbox with the error shows. If the trace shows nothing... well, then I am officially confused. Please give it a shot and let me know what happens. :)
Amended on Thu 18 Dec 2008 02:07 AM by Worstje
Australia Forum Administrator #5
Quote:

Is there some global setting that attempts to expand all instances of the @ symbol and can I turn it off?


No, there is no built in expansion of variables on the command line. I just tested it:


TMOTE gives Sally her@ book.
Huh?


No error message about "@ must be followed by a variable name.".

You must have installed a plugin (I think someone wrote one) that expands variables on the command line, some people want that.
USA #6
Alright...that would make sense then. I'll go through all of my plugins and see which is the culprit. Perhaps even set an alias to disable the plugin on 'TMOTE *' and re-enable it after the TMOTE is sent.

-Daniel
USA #7
Better yet:

Alias: TMOTE *
Script: Send("TMOTE %1")

-Daniel