Difference between revisions of "Addvar"
From Sega Retro
(Created page with "<includeonly>{{#vardefine:{{{1}}}|{{#expr:{{#var:{{{1}}}}}+{{{2|0}}}}}}}</includeonly><noinclude> Add a value to a variable. ==Usage== <pre> <nowiki>{{#vardefine:testvalue|5}...") |
|||
Line 1: | Line 1: | ||
− | <includeonly>{{#vardefine:{{{1}}}|{{#expr:{{#var:{{{1}}}}}+{{{2|0 | + | <includeonly>{{#vardefine:{{{1}}}|{{#expr:{{#var:{{{1}}}}}+{{#if:{{{2|}}}|{{{2}}}|0}}}}}}</includeonly><noinclude> |
Add a value to a variable. | Add a value to a variable. | ||
Revision as of 22:26, 18 May 2015
Add a value to a variable.
Usage
{{#vardefine:testvalue|5}} {{addvar|testvalue|3}} testvalue = {{#var:testvalue}}
Returns:
testvalue = 8