world.GetGlobalOption

MUSHclient script function (Method) — introduced in version 4.18

Gets the value of a global configuration option

Prototype

VARIANT GetGlobalOption(BSTR OptionName);

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).

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.

Related topic

Option setting and retrieval

See also

FunctionDescription
GetGlobalOptionListGets the list of global options
GetInfoGets information about the current world