S
t = t[select(i, ...)]
И тут стоит пихнуть (i - 1)
, для точности позиции.local function getTableValue(tbl, ...)
local t = tbl
for i = 1, select("#", ...) do
if type(t) ~= 'table' then
return false, (i - 1) .. " element is not table"
end
t = t[select(i, ...)]
end
return true, t
end