Module:Infobox: Difference between revisions
No edit summary |
No edit summary |
||
| Line 17: | Line 17: | ||
local grid | local grid | ||
for k, v in pairs( args ) do | for k, v in pairs( args ) do | ||
local image, num = k:match( '^(image)(%d+)$' ) | if type( k ) == 'string' then | ||
local image, num = k:match( '^(image)(%d+)$' ) | |||
local invImage, invNum = k:match( '^(invimage)(%d+)$' ) | |||
if v:lower() ~= 'none' then | |||
if image then | |||
table.insert( imgCount, tonumber( num ) ) | |||
elseif invImage then | |||
table.insert( invImgCount, tonumber( invNum ) ) | |||
end | |||
end | end | ||
end | end | ||