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
➜ General
➜ Need help with IsAlias please?
|
Need help with IsAlias please?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Andik
(3 posts) Bio
|
| Date
| Sun 25 Oct 2009 01:59 AM (UTC) |
| Message
| I can't seem to get IsAlias to work right. It sends me the 30010 (doesn't exist) message even when the alias exists. For example, I have an alias already called "cb", and I enter within another alias:
Note(IsAlias("cb"))
and it returns 30010. Is it the case that there are global/local aliases like there are variables? If this is the case, how could I access a "global alias"? Or, is the function not working? I'm not very good with Lua yet, and I'm doing this in perhaps a overly simple fashion, i.e. I created an alias, put just the above IsAlias line in the send box, and clicked on "script" in the sendto box. Perhaps I just need to enter more information in the send box? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Sun 25 Oct 2009 02:05 AM (UTC) |
| Message
| Are both aliases in the main world file (ie. not in plugins?).
Can you post both aliases please? The one called "cb" and the one which tests if "cb" exists.
 |
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.
|
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Andik
(3 posts) Bio
|
| Date
| Reply #2 on Sun 25 Oct 2009 02:23 AM (UTC) |
| Message
| Yes, neither are in a plugin. I am actually using this in a more complicated script, but I simplified it since I was having problems, and if I can understand it this way, I can easily move it into my more complicated script. Here are the two aliases I am using to test it out with.
<alias
match="checkexists"
enabled="y"
send_to="12"
sequence="100"
>
<send>Note (IsAlias("cb"))</send>
</alias>
<alias
match="cb"
enabled="y"
sequence="100"
>
<send>cast 'blind'</send>
</alias>
<alias
match="cb *"
enabled="y"
sequence="100"
> | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #3 on Sun 25 Oct 2009 03:01 AM (UTC) |
| Message
| | OK, IsAlias("cb") doesn't test on what the alias matches on ("cb" in this case) it tests the alias name. That is, what you put in the "label" field for the alias. Give the alias a name and it will work. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Andik
(3 posts) Bio
|
| Date
| Reply #4 on Sun 25 Oct 2009 03:03 AM (UTC) |
| Message
| | Oh alright, always wondered what good labels were for, here's one answer! Thanks for the quick reply =) | | 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.
18,004 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top