From 70c73b3a6735131b204f3920b5eca0e81591b97c Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Mon, 25 May 2020 13:46:18 +0200 Subject: [PATCH] Indentation fix --- gamemode/engine/lib/sh_format.lua | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gamemode/engine/lib/sh_format.lua b/gamemode/engine/lib/sh_format.lua index 8170a24..a6e60ad 100644 --- a/gamemode/engine/lib/sh_format.lua +++ b/gamemode/engine/lib/sh_format.lua @@ -13,6 +13,7 @@ end function Quantum.Format.Money( num ) if( num == nil ) then return addMoneyVal( 0 ) end + if( num >= 1e14 ) then return addMoneyVal( num ) elseif( num <= -1e14 ) then @@ -20,12 +21,12 @@ function Quantum.Format.Money( num ) end num = tostring( math.abs( num ) ) - local sep = sep || "," - local dp = string.find( num, "%." ) || #num + 1 + local sep = sep || "," + local dp = string.find( num, "%." ) || #num + 1 - for i = dp - 4, 1, -3 do - num = num:sub( 1, i ) .. sep .. num:sub( i + 1 ) - end + for i = dp - 4, 1, -3 do + num = num:sub( 1, i ) .. sep .. num:sub( i + 1 ) + end - return ( negative && "-" || "" ) .. addMoneyVal( num ) -end \ No newline at end of file + return ( negative && "-" || "" ) .. addMoneyVal( num ) +end