Browse Source

Truncate minibank balances to the nearest 0.01cr.

master
luk3yx 1 month ago
parent
commit
4eae5909b3
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      minibank.lua

+ 2
- 1
minibank.lua 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

Loading…
Cancel
Save