Truncate minibank balances to the nearest 0.01cr.

This commit is contained in:
luk3yx 2019-06-28 21:19:13 +12:00
parent 33cb0738d9
commit 4eae5909b3
1 changed files with 2 additions and 1 deletions

View File

@ -24,7 +24,8 @@ local function getbal(name)
end
function setbal(name, balance)
storage:set_string('minibank-' .. name:lower(), tostring(balance))
storage:set_string('minibank-' .. name:lower(),
tostring(math.floor(balance * 100) / 100))
end
-- Create an empty account for new players