Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, 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.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Bug reports
➜ Greater and lesser operator
Greater and lesser operator
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Indoum
Sweden (17 posts) Bio
|
Date
| Mon 17 Apr 2006 05:23 PM (UTC) |
Message
| When doing this alias,
<alias enabled="y" keep_evaluating="y" match="^!(?:symptom|cured) (\w+)" regexp="y" send_to="12">
<send>if not aff['%1'] and affunknown < 1 then Execute("_illusion symptom/cure without the affliction or unknown registered") end</send>
</alias>
I get this error (line 1134 is the <send></send> one),
Line 1134: Element name must start with letter or underscore, but starts with " " (problem in this file)
It seems to be because of the "affunknown < 1" comparison. When I try to recreate the alias using MUSHclient's builtin editor, it's replaced with "affunknown < 1", which doesn't work well with LUA. | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #1 on Mon 17 Apr 2006 09:59 PM (UTC) |
Message
| This is not a bug, you are getting confused between the way aliases are represented when you copy and paste in XML format, and how they are stored internally.
Fixing it up so you can paste it:
<aliases>
<alias
match="^!(?:symptom|cured) (\w+)"
enabled="y"
regexp="y"
send_to="12"
keep_evaluating="y"
>
<send>if not aff['%1'] and affunknown < 1 then
Execute("_illusion symptom/cure without the affliction or unknown registered")
end</send>
</alias>
</aliases>
In the above example the "<" is indeed converted to "<", however when you paste that into the alias screen the "<" becomes "<" again, which is what Lua expects.
I wouldn't be making aliases manually in the text editor myself, just use the GUI screens to do it, then you don't have to worry about the "<" symbols. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Indoum
Sweden (17 posts) Bio
|
Date
| Reply #2 on Mon 17 Apr 2006 10:55 PM (UTC) Amended on Mon 17 Apr 2006 10:56 PM (UTC) by Indoum
|
Message
| I write all my LUA/XML code in an editor called EditPlus2, far more efficient that way. The builtin editor is iffy and I'm easily lost when searching through thousands of triggers.
Does MUSHclient store the script with < or <? If the first, then I could just enter < in my plugin and MUSHclient would convert it at loadtime, just like with the worldfile?
EDIT: I went ahead and tested it myself, works like a charm. | 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.
11,383 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top