mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-03-18 17:38:13 +00:00
Changes sugested by dan200
This commit is contained in:
parent
2c264728d9
commit
282aa804f8
@ -113,7 +113,7 @@ 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
|
||||
|
||||
@ -121,9 +121,9 @@ local function tabulateCommon( bPaged, ... )
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user