Template:Counter/2: Difference between revisions

From Baldur's Gate 3 Wiki
Jump to navigation Jump to search
m (typo)
(Testing to see if it can define itself if it is not defined.)
Tag: Reverted
Line 1: Line 1:
<includeonly>{{#vardefine:{{{counter name|counter2}}}|{{#expr:{{#var:{{{counter name|counter2}}}}}+1}}}}</includeonly><noinclude>{{Documentation
<includeonly>{{#if:{{#var:counter2}}|{{#vardefine:{{{counter name|counter2}}}|{{#expr:{{#var:{{{counter name|counter2}}}}}+1}}}}|{{#vardefine:counter2|0}}}}</includeonly><noinclude>{{Documentation
|content=Secondary template that adds +1 to the value of the local variable "counter2" every time it is called.
|content=Secondary template that adds +1 to the value of the local variable "counter2" every time it is called.



Revision as of 09:43, 6 February 2024

Template documentation

Secondary template that adds +1 to the value of the local variable "counter2" every time it is called.

Usage

If you need multiple counters that count at the same time you can use {{counter/2}} together with the {{counter}} template.

{{counter/2}} should be defined with {{#vardefine:counter2|0}}. See Template:Counter for documentation.