world.LoadPlugin
Loads a plugin from disk
Prototype
long LoadPlugin(BSTR FileName);
Description
Loads a plugin file from disk. This is intended to let plugins load other plugins if desired. For example, you could make a "scan plugin directory" plugin, that loads all plugins found in a particular directory.
You might use "IsPluginInstalled" to see if a particular plugin is already installed.
If the plugin cannot be loaded an error window will open describing the problem with the plugin (eg. XML parsing error).
However if the problem is simply that the plugin file cannot be found, then no window will open.
You can use ReloadPlugin to reinstall a plugin once it is loaded, if you have changed it.
VBscript example
LoadPlugin "c:/mushclient/plugins/plugin_list.xml"
Jscript example
LoadPlugin ("c:/mushclient/plugins/plugin_list.xml");
PerlScript example
$world->LoadPlugin ("c:/mushclient/plugins/plugin_list.xml");
Python example
world.LoadPlugin ("c:/mushclient/plugins/plugin_list.xml")
Lua example
LoadPlugin ("c:/mushclient/plugins/plugin_list.xml")
Return value
ePluginFileNotFound: Plugin file not found
eProblemsLoadingPlugin: Parsing or other problem in plugin file - see error window
eOK: Loaded OK
Related topic
See also
| Function | Description |
|---|---|
| GetPluginInfo | Gets details about a specified plugin |
| GetPluginList | Gets a list of installed plugins. |
| IsPluginInstalled | Checks to see if a particular plugin is installed |
| ReloadPlugin | Reloads an installed plugin |