mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-06-08 17:44:11 +00:00
Add Check to textutils.tabulate/pagedTabulate
This commit is contained in:
parent
579f7443a8
commit
2c264728d9
@ -122,6 +122,9 @@ local function tabulateCommon( bPaged, ... )
|
|||||||
for n, t in ipairs( tAll ) do
|
for n, t in ipairs( tAll ) do
|
||||||
if type(t) == "table" then
|
if type(t) == "table" then
|
||||||
for n, sItem in pairs(t) do
|
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 )
|
||||||
|
end
|
||||||
nMaxLen = math.max( string.len( sItem ) + 1, nMaxLen )
|
nMaxLen = math.max( string.len( sItem ) + 1, nMaxLen )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user