function table.print(tbl, indent) if not indent then indent = 0 end for k, v in pairs(tbl) do formatting = string.rep(" ", indent) .. k .. ": " if type(v) == "table" then print(formatting) table.print(v, indent+1) elseif type(v) == 'boolean' then print(formatting .. tostring(v)) else print(formatting .. tostring(v)) end end end function table.flip(t) local tt={} for i,v in pairs(t) do tt[v]=i end return tt end function toFraction(n) local w,p=math.modf(n) if p~=0 then p=tonumber(tostring(p):sub(3)) end return w,p end function io.cleanName(name) name=name:gsub("\\","") name=name:gsub("/","") name=name:gsub(":","") name=name:gsub("*","") name=name:gsub("%?","") name=name:gsub("\"","''") name=name:gsub("<","") name=name:gsub(">","") name=name:gsub("|","") return name end function math.numfix(n,x) local str=tostring(n) if #str