Template:Money

From FHX Wiki
Revision as of 10:03, 9 June 2024 by B4ttl3m4st3r (talk | contribs) (Created page with "<noinclude> This is the "Money" template. It should be transcluded in the following format: <pre> {{Money |value= }} </pre> The input value is separated into the 3 different currencies as follow: <pre> pp = Math.floor(value / 10000); gp = Math.floor((value - pp * 10000) / 100); cp = value - pp * 10000 - gp * 100; </pre> </noinclude> <templatestyles src="Money/styles.css" /> <div class="root"> {{#expr: 1/3 round 5 }} https://cdn.fhxrestoration.com/common/interface/icons/...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is the "Money" template. It should be transcluded in the following format:

{{Money
|value=
}}

The input value is separated into the 3 different currencies as follow:

pp = Math.floor(value / 10000);
gp = Math.floor((value - pp * 10000) / 100);
cp = value - pp * 10000 - gp * 100;


0.33333 coins_pp.gif 0.33333 coins_gp.gif 0.33333 coins_cp.gif