Gammon Forum
Entire forum
MUSHclient
General
alias and plugin question
alias and plugin question
|
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Posted by
| Linoge
(1 post) bio
|
Date
| Sun 21 Mar 2004 05:56 PM (UTC) |
Message
| hi, im new to mushclient and was just getting my feet wet
experimenting with plugins. I wrote a plugin that created
an alias which would create other aliases (for different containers, etc..) everthing worked fine, the AddAlias function even returned eOk but the aliases arent being
added to world
my function looked something like this.
a little simplified but i cant get this to
work either.
function SomeFunction()
{
world.AddAlias("", "pup *", "put %1 pack", 1, "");
}
any ideas what im doing wrong?
and one other question is there any built-in way of having the values of variables created in the <script> section of a plugin persist through sessions?
Thanks, Linoge | top |
|
Posted by
| Nick Gammon
Australia (22,975 posts) bio
Forum Administrator |
Date
| Reply #1 on Sun 21 Mar 2004 08:35 PM (UTC) Amended on Sun 21 Mar 2004 08:36 PM (UTC) by Nick Gammon
|
Message
| Aliases
Your AddAlias should work, it worked for me.
However your alias is added to the plugin, not to the world, so if you look at the world's alias list you won't see it.
Try typing:
/world.debug ("plugins");
That will show what aliases are in your plugins.
If that doesn't work, find out what the return code from the AddAlias is, eg.
world.Note (world.AddAlias("", "pup *", "put %1 pack", 1, ""));
If non-zero, look it up in the error code list to see what is going wrong.
Variables
If you "save state" in your plugins the variables will be saved, eg.
<plugin
name="whatever"
...
save_state="y"
...
>
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | 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.
7,838 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.