Module:Dice/Format: Difference between revisions

use dice module's new api
oops, pcall no longer necessary
 
Line 5: Line 5:


function DiceFormat.diceStats(frame)
function DiceFormat.diceStats(frame)
     local dice = pcall(Dice.parse, frame.args.roll)
     local dice = Dice.parse(frame.args.roll)


local template_title = (frame.args.template ~= nil and frame.args.template ~= '') and frame.args.template or 'Dice string'
local template_title = (frame.args.template ~= nil and frame.args.template ~= '') and frame.args.template or 'Dice string'