mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-15 20:50:29 +00:00
Allow Number and Table
This commit is contained in:
parent
845e1b633d
commit
5e244273c2
@ -108,14 +108,9 @@ end
|
|||||||
|
|
||||||
local function tabulateCommon( bPaged, ... )
|
local function tabulateCommon( bPaged, ... )
|
||||||
local tAll = { ... }
|
local tAll = { ... }
|
||||||
for i=1,#tAll,2 do
|
for k,v in ipairs( tAll ) do
|
||||||
if type( tAll[i] ) ~= "number" then
|
if type( v ) ~= "number" and type( v ) ~= "table" then
|
||||||
error( "bad argument #"..i.." (expected number, got " .. type( tAll[i] ) .. ")", 3 )
|
error( "bad argument #"..k.." (expected number/table, got " .. type( v ) .. ")", 3 )
|
||||||
end
|
|
||||||
end
|
|
||||||
for i=2,#tAll,2 do
|
|
||||||
if type( tAll[i] ) ~= "table" then
|
|
||||||
error( "bad argument #"..i.." (expected table, got " .. type( tAll[i] ) .. ")", 3 )
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user