8,756
edits
(process args attempt) |
(reformatted chance to be a percent) |
||
Line 95: | Line 95: | ||
finalTable[i]['weight'] = row['weight'] | finalTable[i]['weight'] = row['weight'] | ||
-- calculate final chance | -- calculate final chance | ||
finalTable[i]['chance'] = row['weight']/totalWeight | finalTable[i]['chance'] = string.format("%.2f%%",row['weight']*100/totalWeight) | ||
end | end | ||
return (p.formatTable(finalTable)) | return (p.formatTable(finalTable)) |