ReloadPlugin
Script function

world.ReloadPlugin

DOC_scripting Read about scripting

Type

Method

Summary

Reloads an installed plugin

Prototype

long ReloadPlugin(BSTR PluginID);

DOC_data_types View list of data type meanings


Description

This is designed to help plugin writers quickly reload a plugin they are testing. You can specify the plugin by unique ID, or by plugin name (assuming the name is unique in your list of plugins).

eg.

world.ReloadPlugin "chat"
world.ReloadPlugin "753ba7e011f3c8943a885f18"

However, a plugin cannot reload itself. That would mean the script was deleted out from under itself. If you try to work around that by having plugin A call plugin B, and plugin B reloads plugin A, you will probably get a crash. If you really want to make a "reload myself" function in a plugin, use something like DoAfterSpecial, to send the "ReloadPlugin" command to the script engine after a 1-second delay.

The intention here is for plugin authors to make an alias that they can type when they want to retest their plugin.



VBscript example

world.ReloadPlugin "chat"
world.ReloadPlugin "753ba7e011f3c8943a885f18"



Jscript example

world.ReloadPlugin ("chat");
world.ReloadPlugin ("753ba7e011f3c8943a885f18");



PerlScript example

$world->ReloadPlugin ("chat");
$world->ReloadPlugin ("753ba7e011f3c8943a885f18");



Python example

world.ReloadPlugin ("chat")
world.ReloadPlugin ("753ba7e011f3c8943a885f18")



Lua example

ReloadPlugin ("chat")
ReloadPlugin ("753ba7e011f3c8943a885f18")



Return value

eNoSuchPlugin: Plugin is not currently installed
eBadParameter: Cannot reload ourselves
ePluginFileNotFound: Plugin file not found
eProblemsLoadingPlugin: Parsing or other problem in plugin file - see error window
eOK: Loaded OK


DOC_errors View list of return code meanings


See Also ...

Topics

DOC_aliases Aliases
DOC_Arrays Arrays
DOC_plugins Plugins
DOC_scripting Scripting
DOC_timers Timers
DOC_triggers Triggers
DOC_variables Variables

Functions

FNC_BroadcastPlugin BroadcastPlugin (Broadcasts a message to all installed plugins)
FNC_CallPlugin CallPlugin (Calls a routine in a plugin)
FNC_EnablePlugin EnablePlugin (Enables or disables the specified plugin)
FNC_GetPluginID GetPluginID (Returns the 24-character ID of the current plugin)
FNC_GetPluginInfo GetPluginInfo (Gets details about a specified plugin)
FNC_GetPluginList GetPluginList (Gets a list of installed plugins.)
FNC_GetPluginName GetPluginName (Returns the name of the current plugin)
FNC_GetPluginTimerInfo GetPluginTimerInfo (Gets details about a named timer for a specified plugin)
FNC_GetPluginTimerList GetPluginTimerList (Gets the list of timers in a specified plugin)
FNC_GetPluginVariable GetPluginVariable (Gets the contents of a variable belonging to a plugin)
FNC_GetPluginVariableList GetPluginVariableList (Gets the list of variables in a specified plugin)
FNC_IsPluginInstalled IsPluginInstalled (Checks to see if a particular plugin is installed)
FNC_LoadPlugin LoadPlugin (Loads a plugin from disk)
FNC_PluginSupports PluginSupports (Checks if a plugin supports a particular routine)
FNC_SaveState SaveState (Saves the state of the current plugin)

(Help topic: function=ReloadPlugin)

DOC_contents Documentation contents page