Module:LuaVar/doc: Difference between revisions

From IdleOn MMO Wiki
imported>Kiokurashi
No edit summary
imported>Kiokurashi
No edit summary
 
Line 8: Line 8:




To define a variable and returning the value:
To define a variable and return the value:
<pre>{{#invoke:LuaVar|varDefineEcho
<pre>{{#invoke:LuaVar|varDefineEcho
|name= Variable Name
|name= Variable Name

Latest revision as of 02:51, 26 August 2021

Basics - Capitalization of LuaVar and the function (example varDefine) is required.:

To define a variable without returning the value:

{{#invoke:LuaVar|varDefine
|name= Variable Name
|value= Value
}}


To define a variable and return the value:

{{#invoke:LuaVar|varDefineEcho
|name= Variable Name
|value= Value
}}


To retrieve the value of a variable. Will inform if the variable is not defined.

{{#invoke:LuaVar|var
|name= Variable Name
}}