Permalink
Browse files

Switch lua.lua to use extutils.pagedPrint() for Tables

With this PR lua.lua can how the full table, if the table is bigger than your Screen.
  • Loading branch information...
Wilma456 committed Aug 20, 2017
1 parent 579f744 commit 9f036f6f8a96fd2f286a9a4144072f9c8ec1c0e9
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/main/resources/assets/computercraft/lua/rom/programs/lua.lua
@@ -72,13 +72,13 @@ while bRunning do
if type( value ) == "table" then
local metatable = getmetatable( value )
if type(metatable) == "table" and type(metatable.__tostring) == "function" then
print( tostring( value ) )
textutils.pagedPrint( tostring( value ) )
else
local ok, serialised = pcall( textutils.serialise, value )
if ok then
print( serialised )
textutils.pagedPrint( serialised )
else
print( tostring( value ) )
textutils.pagedPrint( tostring( value ) )
end
end
else

0 comments on commit 9f036f6

Please sign in to comment.