Module:Hatnote: Difference between revisions

checkType will work in for loops as well, with the power of the i variable
(add error check to _formatPageTables)
(checkType will work in for loops as well, with the power of the i variable)
Line 66:
local links = {}
for i, t in ipairs(pages) do
if typecheckType(t)'_formatPageTables', ~=i, t, 'table' then)
error(string.format(
"bad argument #%d to '_formatPageTables' (table expected, got %s)",
i,
type(t)
), 2)
end
local link = t[1]
local display = t[2]
Anonymous user