Module:MultiTabs: Difference between revisions

From EarthMC
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 11: Line 11:
function p.create( frame )
function p.create( frame )
     local int = GetTableLng(frame.args)
     local int = GetTableLng(frame.args)
     return int
    local width = 100/int
     return width
end
end




return p
return p

Revision as of 22:39, 23 October 2023

Script error: Lua error: Internal error: The interpreter exited with status 126.

local p = {} --p stands for package

function GetTableLng(tbl)
  local getN = 0
  for n in pairs(tbl) do 
    getN = getN + 1 
  end
  return getN
end

function p.create( frame )
    local int = GetTableLng(frame.args)
    local width = 100/int
    return width
end


return p