Register forum user name Search FAQ

MUSHclient scripting

Description of MUSHclient world function: world.GetGlobalOptionList


Name GetGlobalOptionList
Type Method
Summary Gets the list of global options
Prototype VARIANT GetGlobalOptionList();
Description

Returns a variant array which is a list of all global options that you can get with GetGlobalOption. Global options are client-wide options that are not tied to a particular world.

The examples show extracting all option names, and their values.

The option names should be reasonably self-explanatory.


Note: Available in version 4.18 onwards.


VBscript example
For Each opt In world.GetGlobalOptionList
    world.note opt + " = " + cstr (world.GetGlobalOption ( opt ))
Next
Jscript example
optionlist = new VBArray(world.GetGlobalOptionList()).toArray();

 for (i = 0; i < optionlist .length; i++)
   world.note(optionlist [i] + " = " + world.GetGlobalOption (optionlist [i] ));
PerlScript example
foreach $item (Win32::OLE::in ($world->GetGlobalOptionList))
 {
 $world->note($item . " = " . $world->GetGlobalOption($item));
 }
Python example
for opt in world.GetGlobalOptionList: world.Note (opt)
Lua example
for k, v in pairs (GetGlobalOptionList()) do 
  Note (v, " = ", GetGlobalOption(v)) 
end
Returns It returns a variant array containing the names of all the options. Use "ubound" to find the number of options in the list. You can then use "GetGlobalOption" to return the value for that particular option.
Introduced in version 4.18

See also ...

Function Description
GetAlphaOption Gets the value of an alphanumeric configuration option
GetAlphaOptionList Gets the list of world alphanumeric options
GetGlobalOption Gets the value of a global configuration option
GetOption Gets value of a named world option
GetOptionList Gets the list of world options
SetAlphaOption Sets value of a named world alphanumeric option
SetOption Sets value of a named world option

Search for script function

Enter a word or phrase in the box below to narrow the list down to those that match.

The function name, prototype, summary, and description are searched.

Search for:   

Leave blank to show all functions.


Return codes

Many functions return a "code" which indicates the success or otherwise of the function.

You can view a list of the return codes


Function prototypes

The "prototype" part of each function description lists exactly how the function is called (what arguments, if any, to pass to it).

You can view a list of the data types used in function prototypes


View all functions

[Back]

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