Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR LUA

print a table in lua

function dump(o)
   if type(o) == 'table' then
      local s = '{ '
      for k,v in pairs(o) do
         if type(k) ~= 'number' then k = '"'..k..'"' end
         s = s .. '['..k..'] = ' .. dump(v) .. ','
      end
      return s .. '} '
   else
      return tostring(o)
   end
end
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #print #table #lua
ADD COMMENT
Topic
Name
9+3 =