From d2fe2251bf9daf0d672b946657fb51ce61bfed47 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Tue, 24 Oct 2017 13:55:48 +0100 Subject: [PATCH] fixed boolean --- locale/ExpGaming-Core/ExpGaming - Lib.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/locale/ExpGaming-Core/ExpGaming - Lib.lua b/locale/ExpGaming-Core/ExpGaming - Lib.lua index f0fc8687..2bdc90ff 100644 --- a/locale/ExpGaming-Core/ExpGaming - Lib.lua +++ b/locale/ExpGaming-Core/ExpGaming - Lib.lua @@ -74,7 +74,8 @@ function json_log(lua_table,no_log) done[key] = true if type(value) == 'table' then table.insert(result,json_log(value,true)) elseif type(value) == 'string' then table.insert(result,'"'..value..'"') - elseif type(value) == 'number' or type(value) == 'boolean' then table.insert(result,value) + elseif type(value) == 'number' then table.insert(result,value) + elseif type(value) == 'boolean' then table.insert(result,tostring(value)) else table.insert(result,'null') end end for key,value in pairs(lua_table) do @@ -82,7 +83,8 @@ function json_log(lua_table,no_log) only_indexs = false if type(value) == 'table' then table.insert(result,'"'..key..'":'..json_log(value,true)) elseif type(value) == 'string' then table.insert(result,'"'..key..'":"'..value..'"') - elseif type(value) == 'number' or type(value) == 'boolean' then table.insert(result,'"'..key..'":'..value) + elseif type(value) == 'number' then table.insert(result,'"'..key..'":'..value) + elseif type(value) == 'boolean' then table.insert(result,'"'..key..'":'..tostring(value)) else table.insert(result,'"'..key..'":null') end end end