Template:Lb: Difference between revisions

From TalossaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:
New conversion code since I have lost track of the other goddamn one:
New conversion code since I have lost track of the other goddamn one:
IF Raw bence more than 59?
IF Raw bence more than 59?
{{#ifexpr: {{#expr: {{#expr: {{#expr: {{#expr: {{#if: {{{1|}}} | {{formatnum: {{{1}}}|R}} | 0 }} * 100}} + {{#if: {{{2|}}} | {{formatnum: {{{2}}}|R}} | 0 }} }} * 0.4}} round2 }} < 59 | yes | no }}
{{#ifexpr: {{#expr: {{#expr: {{#expr: {{#expr: {{#if: {{{1|}}} | {{formatnum: {{{1}}}|R}} | 0 }} * 100}} + {{#if: {{{2|}}} | {{formatnum: {{{2}}}|R}} | 0 }} }} * 0.4}} round2 }} < 59 | no | yes }}


THEN convert  
THEN convert  

Revision as of 17:11, 30 June 2012

Raw bence code (input of dollars and cents to bence; works): 0

Total conversion (parses bence to louise and bence; broken): Expression error: Unexpected < operator.

New conversion code since I have lost track of the other goddamn one: IF Raw bence more than 59? no

THEN convert

ELSE raw bence



Usage

This template automatically converts United States dollars (USD) to the Talossan bent and louis, the base unit of currency for Talossa. Since the template author has no goddamn idea what the current rate might be, he has put in a temporary arbitrary sum while he works out the ridiculous parser logic required. To use this template (don't use it yet), just type {{Lb|dollars|cents}}. Do not include any symbols ($ or ¤).