Extension:VariablesLua

The VariablesLua extension provides support for the Variables extension in Lua modules by the Scribunto extension.


 * Bugs and Feature Requests: Issues at Github

Usage
Manual: Liquipedia Help

The extension can be loaded in Lua modules by the Scribunto extension like this:

Functions
Functions are identical to the ones provided by the Variables extension.

VariablesLua.vardefine
Stores the given value under the given name. If the value is, an empty string is stored.

VariablesLua.vardefineecho
Identical to VariablesLua.vardefine, but returns the value after storing it.

VariablesLua.var
Retrieve a variable stored under the given name.

VariablesLua.varexists
Checks if a variable exists. Returns a boolean value.

VariablesLua.var_final
Returns the last value stored (i.e. the last VariablesLua.vardefine in the code).