Permalink
Browse files

Changes sugested by dan200

  • Loading branch information...
Wilma456 committed Sep 12, 2017
1 parent 2c26472 commit 282aa804f89f7adfafa16501ff39884a28b92bc5
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/main/resources/assets/computercraft/lua/rom/apis/textutils.lua
@@ -113,17 +113,17 @@ local function tabulateCommon( bPaged, ... )
local tAll = { ... }
for k,v in ipairs( tAll ) do
if type( v ) ~= "number" and type( v ) ~= "table" then
error( "bad argument #"..k.." (expected number/table, got " .. type( v ) .. ")", 3 )
error( "bad argument #"..k.." (expected number or table, got " .. type( v ) .. ")", 3 )
end
end
local w,h = term.getSize()
local nMaxLen = w / 8
for n, t in ipairs( tAll ) do
if type(t) == "table" then
for n, sItem in pairs(t) do
if type( sItem ) ~= "number" and type( sItem ) ~= "string" then
error( "textutils.tabulate/pagedTabulate only allow strings and numbers in the table", 3 )
for nu, sItem in pairs(t) do
if type( sItem ) ~= "string" then
error( "bad argument #"..n.."."..nu.." (expected string, got " .. type( sItem ) .. ")", 3 )
end
nMaxLen = math.max( string.len( sItem ) + 1, nMaxLen )
end

0 comments on commit 282aa80

Please sign in to comment.