Module:LuaVar/doc: Difference between revisions
From IdleOn MMO Wiki
imported>Kiokurashi (Created page with "Basics (capitalization of LuaVar and the function (example varDefine) is required.: To define a variable without returning the value: <pre>{{#invoke:LuaVar|varDefine |name= V...") |
imported>Kiokurashi No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
Basics | Basics - Capitalization of LuaVar and the function (example varDefine) is required.: | ||
To define a variable without returning the value: | To define a variable without returning the value: | ||
Line 8: | Line 8: | ||
To define a variable and | 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 }}