Variables configuration (list)
Add...

Click to add a variable.

Edit...

Click to edit an existing variable.

Remove

Click to remove one or more selected variables from the list.

Find...

Click to find a variable based on its contents.

Find Next

Click to repeat the next find (find another one that matches).

Load...

Click to load variables from disk.

Save...

Click to save selected variables to disk.

Copy

Click to copy the selected variable(s) to the clipboard in XML format.

Paste

Click to paste the clipboard into the variables list. The variables must be in XML format (such as produced by the Copy button). Only variables will be pasted, if there are other types on the clipboard.

Copy and paste is intended to allow you to get/put variables onto the Forum, or exchange them between worlds or with other MUSHclient users.


Filter by:

Check to filter the visible items by the function "filter". Click on the button labelled "..." next to the "filter by" checkbox to enter the code for the scripted filter function. The filter function must be written in Lua and have a function named "filter" in the script, taking one argument which is the name of the variable. For example, to show only variables that start with "mxp_":


function filter (s)
  return string.find (s, "^mxp_") ~= nil
end -- filter


You can use GetVariable to find out the contents if that variable if needed, and work out whether to show it or not. If the function returns the boolean value "false" then the item is not shown, otherwise it is shown in the list.

The filter script is saved in the world file, so you can use it again next time, however the filter flag is not remembered. You must explicitly enable it each time you want to filter the list.


See Also ...

Topics

DOC_Arrays Arrays
DOC_plugins Plugins
DOC_scripting Scripting
DOC_variables Variables

Command

CMD_ID_GAME_CONFIGURE_VARIABLES ConfigureVariables (Sets program variables)

Dialog

DLG_IDD_EDIT_VARIABLE Edit variable

Functions

FNC_DeleteVariable DeleteVariable (Deletes a variable)
FNC_GetVariable GetVariable (Gets the contents of a variable)
FNC_GetVariableList GetVariableList (Gets the list of variables)
FNC_SetVariable SetVariable (Sets the value of a variable)

(Help topic: dialog=IDD_PREFS_P18)

DOC_contents Documentation contents page