Module:Param Parse: Difference between revisions
That's not how math
InvalidCards (talk | contribs) No edit summary |
InvalidCards (talk | contribs) (That's not how math) |
||
Line 199:
function parse.value_func(val)
val = tonumber(val)
local silver = math.floor(val / 1000)▼
local gold = math.floor(val / 1000000)▼
local output = ''
▲ local gold = math.floor(val / 1000000)
if gold > 0 then
output = gold .. '[[File:Gold coin.png|link=]]'
val = val - (gold * 1000000)
end
▲ local silver = math.floor(val / 1000)
if silver > 0 then
output = output .. silver .. '[[File:Silver coin.png|link=]]'
val = val - (silver * 1000)
end
output = output ..
return output
end
|