Register forum user name Search FAQ

GetGlobalOption

Script function

world.GetGlobalOption

Read about scripting

Type

Method

Summary

Gets the value of a global configuration option

Prototype

VARIANT GetGlobalOption(BSTR OptionName);

View list of data type meanings

Description

Gets the value of an alphanumeric global option. These are global options that are not tied to a particular world.

You can use GetGlobalOptionList to get a list of the names of all possible options.

The option name is not case-sensitive. String option are returned as type BSTR (string), other options (booleans, numbers) are returned as type I4 (long). Non-existant options are returned as type EMPTY (empty).


Available in MUSHclient version 4.18 onwards.



VBscript example

world.Note world.GetGlobalOption ("DefaultLogFileDirectory")


Jscript example

/world.Note (world.GetGlobalOption ("DefaultLogFileDirectory"));


PerlScript example

/$world->Note ($world->GetGlobalOption ("DefaultLogFileDirectory"));


Python example

world.Note(world.GetGlobalOption ("DefaultLogFileDirectory"))


Lua example

Note (GetGlobalOption ("DefaultLogFileDirectory"))


Return value

The value of the requested option, or an "empty" variant if the option does not exist.


See Also ...

Topic

Option setting and retrieval

Functions

(GetAlphaOption) Gets the value of an alphanumeric configuration option
(GetAlphaOptionList) Gets the list of world alphanumeric options
(GetCurrentValue) Gets the current value of a named world option
(GetDefaultValue) Gets the default value of a named world option
(GetGlobalOptionList) Gets the list of global options
(GetInfo) Gets information about the current world
(GetLoadedValue) Gets value of a named world option, as loaded from the world file
(GetOption) Gets value of a named world option
(GetOptionList) Gets the list of world options
(SetAlphaOption) Sets value of a named world alphanumeric option
(SetInputFont) Sets the font for the input window
(SetOption) Sets value of a named world option
(SetOutputFont) Sets the font for the output window.

(Help topic: function=GetGlobalOption)

Documentation contents page


Search ...

Enter a search string to find matching documentation.

Search for:   

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.