diff options
Diffstat (limited to 'gamemode/core/database/sv_queries.lua')
| -rw-r--r-- | gamemode/core/database/sv_queries.lua | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gamemode/core/database/sv_queries.lua b/gamemode/core/database/sv_queries.lua index 96908d4..887711a 100644 --- a/gamemode/core/database/sv_queries.lua +++ b/gamemode/core/database/sv_queries.lua @@ -40,9 +40,23 @@ function q.deserialize_player(ply,str) local tbl = util.JSONToTable(str) if not tbl then log.error("Failed to deserialize player " .. ply:Nick() .. "\n" .. str) + else + log.debug("Got player data:") + for k,v in pairs(tbl) do + log.debug("\t" .. tostring(k) .. " : " .. tostring(v)) + if k ~= "credits" then + for i,j in pairs(v) do + log.debug("\t\t" .. tostring(i) .. " : " .. tostring(j)) + for k,l in pairs(j) do + log.debug("\t\t\t" .. tostring(k) .. " : " .. tostring(l)) + end + end + end + end end local invs = tbl.inventories for k,v in pairs(invs) do + log.debug("Telling track to give inventory " .. tostring(v[1])) track.GiveInventoryWithData(ply,v[1],v[2]) end ply.data.skills = tbl.skills or {} @@ -52,7 +66,7 @@ function q.deserialize_player(ply,str) end ---Formats for an sql query. --- Kind of like string.format, but arguments are pasesd through SQL sanitization  +-- Kind of like string.format, but arguments are pasesd through SQL sanitization --@tparam string fmt The string.format function --@tparam varargs ... The parameters to format the string with function q.s_fmt(fmt,...) |
