Difference between revisions of "Addvar"
From Sonic Retro
(Created page with "<includeonly>{{#vardefine:{{{1}}}|{{#expr:{{#var:{{{1}}}}}+{{#if:{{{2|}}}|{{{2}}}|0}}}}}}</includeonly><noinclude> Add a value to a variable. ==Usage== <pre> <nowiki>{{#varde...") |
BSonirachi (talk | contribs) m (Text replacement - "Category:Sonic Retro templates" to "Category:Templates") |
||
Line 13: | Line 13: | ||
{{#vardefine:testvalue|5}}{{addvar|testvalue|3}} | {{#vardefine:testvalue|5}}{{addvar|testvalue|3}} | ||
testvalue = {{#var:testvalue}} | testvalue = {{#var:testvalue}} | ||
− | [[Category: | + | [[Category:Templates]] |
</noinclude> | </noinclude> |
Latest revision as of 19:17, 1 January 2022
Add a value to a variable.
Usage
{{#vardefine:testvalue|5}} {{addvar|testvalue|3}} testvalue = {{#var:testvalue}}
returns
testvalue = 8