function LuaHelps.PrintTable(t, name)
local spaceAdd = 4
local function getTableStr(t, name, space)
local str = string.format("%s%s = {\n", string.rep(" ", space - spaceAdd), (name or "table"))
local init = false
for k, v in pairs(t) do
if type(v) == "table" then
str = str .. getTableStr(v, k, space + spaceAdd)
else
if type(v) == "string" and string.len(v) > 2 and string.sub(v, 1, 3) == "cs." then
init = true
end
str = str .. string.format("%s%s = %s\n", string.rep(" ", space), k, v)
end
end
str = str .. string.rep(" ", space - spaceAdd) .. "}\n"
return str
end
if (type(t) == "table") then
print("\n" .. getTableStr(t, name, spaceAdd))
else
print(t)
end
end