Template talk:Cost

Bug? Feature?
I see no way of fixing it, though, as tempates and ParserFunctions do not distinguish between the empty string (modulo whitespace) and lack of an argument. 82.165.253.73 08:12, 28 August 2006 (CDT)


 * You can distinguish. If the first parameter is undefined, then  will not equal  .  You could say it's a bug in the template's documentation rather than the implementation.  --Fyren 08:48, 28 August 2006 (CDT)

rewritten version incoming
There is a rewritten version at User:M.mendel/Templates/cost. It has the following advantages: Since a change of this template affects 500+ pages, I thought I'd ask for criticism and/or suggestions before I implement the change. Any takers? --◄mendel► 18:24, 6 October 2008 (UTC)
 * 1) The cost doesn't wrap, i.e. numbers and symbols always stay on the same line.
 * 2) The bug mentioned above is fixed.
 * 3) The new template can actually produce 12  0 ; this is not possible now.
 * 4) The old template adds  to produce 24  345 ; the new one gives a warning (as the old one should have done per the documentation).
 * 5) The template code is actually readable and works without complicated expressions.


 * Hope you don't mind, I changed your list to an ordered one so I can respond point-by-point.
 * Whoo!
 * Whoo!
 * Is that really necessary? Given a platinum value such as 12, most people will understand the implied 0.
 * What's your deal with huge, brightly-colored error messages anyway? :P
 * In defense of the original template, it was created before the StringFunctions extension was installed on GuildWiki, so it had to rely on the mathematical abilities of the ParserFunctions extension.
 * I don't see any problems with your version, and I can't think of any other possible improvements at this time. &mdash;Dr Ishmael [[Image:Diablo_the_chicken.gif]] 19:20, 6 October 2008 (UTC)