Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ MUSHclient
➜ General
➜ Wish for variable specification character to be omitted from world input line
Wish for variable specification character to be omitted from world input line
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Daniel P
USA (97 posts) Bio
|
Date
| Mon 15 Dec 2008 06:47 PM (UTC) |
Message
| 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 | Top |
|
Posted by
| Worstje
Netherlands (899 posts) Bio
|
Date
| Reply #1 on Mon 15 Dec 2008 08:19 PM (UTC) |
Message
| 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? :) | Top |
|
Posted by
| Nick Gammon
Australia (23,057 posts) Bio
Forum Administrator |
Date
| Reply #2 on Mon 15 Dec 2008 11:01 PM (UTC) |
Message
| 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
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Daniel P
USA (97 posts) Bio
|
Date
| Reply #3 on Thu 18 Dec 2008 12:09 AM (UTC) |
Message
| 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
| Top |
|
Posted by
| Worstje
Netherlands (899 posts) Bio
|
Date
| Reply #4 on Thu 18 Dec 2008 01:37 AM (UTC) Amended on Thu 18 Dec 2008 02:07 AM (UTC) by Worstje
|
Message
| 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. :) | Top |
|
Posted by
| Nick Gammon
Australia (23,057 posts) Bio
Forum Administrator |
Date
| Reply #5 on Thu 18 Dec 2008 06:30 AM (UTC) |
Message
|
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. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Daniel P
USA (97 posts) Bio
|
Date
| Reply #6 on Thu 18 Dec 2008 04:52 PM (UTC) |
Message
| 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 | Top |
|
Posted by
| Daniel P
USA (97 posts) Bio
|
Date
| Reply #7 on Thu 18 Dec 2008 04:55 PM (UTC) |
Message
| Better yet:
Alias: TMOTE *
Script: Send("TMOTE %1")
-Daniel | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
20,331 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top