Anonymous

Module:Calculator/Level: Difference between revisions

From Melvor Idle
m
Format numeric output
m (Call main function)
m (Format numeric output)
Line 2: Line 2:


local MEXP = require('Module:Experience')
local MEXP = require('Module:Experience')
local formatnum = require('Module:Shared').formatnum


function p.main(frame)
function p.main(frame)
Line 16: Line 17:
local expToN = MEXP.expForLevel(nextLevel) - exp
local expToN = MEXP.expForLevel(nextLevel) - exp
return string.format("Experience for level %d: %d. Experience for next level: %d", skillLevel, exp, expToN)
return string.format("Experience for level %d: %s. Experience for next level: %s", skillLevel,
formatnum(exp),  
formatnum(expToN))
end
end


return p
return p
2,875

edits