Template:TempCounter: Difference between revisions

From Zelda Dungeon Wiki
Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
(Undid revision 20205 by Zelda101 (talk))
m (These were causing issues.)
 
Line 1: Line 1:
{{#vardefine:count16|{{#if:{{{16|1}}}|0|0}}}}<!--
{{#vardefine:count16|{{#if:{{{16|1}}}|0|0}}}}{{#vardefine:count15|{{#if:{{{15|}}}|1|0}}}}{{#vardefine:count14|{{#if:{{{14|}}}|1|0}}}}{{#vardefine:count13|{{#if:{{{13|}}}|1|0}}}}{{#vardefine:count12|{{#if:{{{12|}}}|1|0}}}}{{#vardefine:count11|{{#if:{{{11|}}}|1|0}}}}{{#vardefine:count10|{{#if:{{{10|}}}|1|0}}}}{{#vardefine:count9|{{#if:{{{9|}}}|1|0}}}}{{#vardefine:count8|{{#if:{{{8|}}}|1|0}}}}{{#vardefine:count7|{{#if:{{{7|}}}|1|0}}}}{{#vardefine:count6|{{#if:{{{6|}}}|1|0}}}}{{#vardefine:count5|{{#if:{{{5|}}}|1|0}}}}{{#vardefine:count4|{{#if:{{{4|}}}|1|0}}}}{{#vardefine:count3|{{#if:{{{3|}}}|1|0}}}}{{#vardefine:count2|{{#if:{{{2|}}}|1|0}}}}{{#vardefine:count1|{{#if:{{{1|}}}|1|0}}}}{{#vardefine:count|{{#expr:{{#var:count1}}+{{#var:count2}}+{{#var:count3}}+{{#var:count4}}+{{#var:count5}}+{{#var:count6}}+{{#var:count7}}+{{#var:count8}}+{{#var:count9}}+{{#var:count10}}+{{#var:count11}}+{{#var:count12}}+{{#var:count13}}+{{#var:count14}}+{{#var:count15}}+{{#var:count16}}}}}}{{#ifeq:{{{1|}}}|~|16 parameters|{{#var:count}}}}<noinclude>
-->{{#vardefine:count15|{{#if:{{{15|}}}|1|0}}}}<!--
-->{{#vardefine:count14|{{#if:{{{14|}}}|1|0}}}}<!--
-->{{#vardefine:count13|{{#if:{{{13|}}}|1|0}}}}<!--
-->{{#vardefine:count12|{{#if:{{{12|}}}|1|0}}}}<!--
-->{{#vardefine:count11|{{#if:{{{11|}}}|1|0}}}}<!--
-->{{#vardefine:count10|{{#if:{{{10|}}}|1|0}}}}<!--
-->{{#vardefine:count9|{{#if:{{{9|}}}|1|0}}}}<!--
-->{{#vardefine:count8|{{#if:{{{8|}}}|1|0}}}}<!--
-->{{#vardefine:count7|{{#if:{{{7|}}}|1|0}}}}<!--
-->{{#vardefine:count6|{{#if:{{{6|}}}|1|0}}}}<!--
-->{{#vardefine:count5|{{#if:{{{5|}}}|1|0}}}}<!--
-->{{#vardefine:count4|{{#if:{{{4|}}}|1|0}}}}<!--
-->{{#vardefine:count3|{{#if:{{{3|}}}|1|0}}}}<!--
-->{{#vardefine:count2|{{#if:{{{2|}}}|1|0}}}}<!--
-->{{#vardefine:count1|{{#if:{{{1|}}}|1|0}}}}<!--
-->{{#vardefine:count|{{#expr:{{#var:count1}}+{{#var:count2}}+{{#var:count3}}+{{#var:count4}}+{{#var:count5}}+{{#var:count6}}+{{#var:count7}}+{{#var:count8}}+{{#var:count9}}+{{#var:count10}}+{{#var:count11}}+{{#var:count12}}+{{#var:count13}}+{{#var:count14}}+{{#var:count15}}+{{#var:count16}}}}}}<!--
-->{{#ifeq:{{{1|}}}|~|16 parameters|{{#var:count}}}}<noinclude>


==Purpose==
==Purpose==

Latest revision as of 23:39, January 11, 2013

0

Purpose

This template counts the number of parameters used in it. This is intended to be used to give a variable for other templates to use which need to know how many parameters are being used in them in order to have the correct coding.

Usage

To use this template, type:     {{TempCounter| Parameters }}

Where in place of Parameters you list all the parameters that you need to count in another template. This template currently supports up to 16 parameters. Any further parameters result in an inaccurate number.