[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  alias and plugin question

alias and plugin question

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Linoge   (1 post)  [Biography] 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
[Go to top] top

Posted by Nick Gammon   Australia  (22,985 posts)  [Biography] 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
[Go to top] 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,866 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] 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.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]