From 4eae5909b32da4f8e2e20c087ca6b7948a421713 Mon Sep 17 00:00:00 2001 From: luk3yx Date: Fri, 28 Jun 2019 21:19:13 +1200 Subject: [PATCH] Truncate minibank balances to the nearest 0.01cr. --- minibank.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/minibank.lua b/minibank.lua index 7ac7682..60785a4 100644 --- a/minibank.lua +++ b/minibank.lua @@ -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