mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-11-15 00:24:52 +09:00
Fixed json
This commit is contained in:
1 parent
b6fd5f917d
commit
c14aae9e3b
1 file changed
+3
-3
@@ -72,9 +72,9 @@ function json_log(table,no_log)
|
||||
local json = '{'
|
||||
for key,value in pairs(table) do
|
||||
if type(value) == 'table' then value = json_log(value,true) end
|
||||
if type(value) == 'string' then json = json..'"'..key..'"="'..value..'",' end
|
||||
elseif type(value) == 'number' then json = json..'"'..key..'"='..value..','
|
||||
else json = json..'"'..key..'"=null,' end
|
||||
if type(value) == 'string' then json = json..'"'..key..'":"'..value..'",' end
|
||||
elseif type(value) == 'number' then json = json..'"'..key..'":'..value..','
|
||||
else json = json..'"'..key..'":null,' end
|
||||
end
|
||||
if no_log then return json:sub(-1)..'}'
|
||||
else game.write_file('multi.log',json:sub(-1)..'}\n', true, 0) end
|
||||
|
||||
Reference in new issue
Block a user