From 466d640c5b8e192adb684a40084f6fa2de35445a Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Tue, 24 Oct 2017 13:18:28 +0100 Subject: [PATCH] again -_- --- locale/ExpGaming-Core/ExpGaming - Lib.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/ExpGaming-Core/ExpGaming - Lib.lua b/locale/ExpGaming-Core/ExpGaming - Lib.lua index 1154cc02..c6e9f637 100644 --- a/locale/ExpGaming-Core/ExpGaming - Lib.lua +++ b/locale/ExpGaming-Core/ExpGaming - Lib.lua @@ -68,16 +68,16 @@ function table.tostring( tbl ) return "{" .. table.concat( result, "," ) .. "}" end -- converts a table to json and logs it to a file -function json_log(table,no_log) +function json_log(lua_table,no_log) local result, done, only_indexs = {}, {}, true - for key,value in ipairs(table) do + for key,value in ipairs(lua_table) do done[key] = true if type(value) == 'table' then value = table.insert(result,json_log(value,true)) end if type(value) == 'string' then json = table.insert(result,key..':""'..value..'"') elseif type(value) == 'number' then table.insert(result,key..':'..value) else table.insert(result,key..':null') end end - for key,value in pairs(table) do + for key,value in pairs(lua_table) do if not done[key] then only_indexs = false if type(value) == 'table' then table.insert(result,json_log(value,true)) end