4,951
edits
Falterfire (talk | contribs) (Created with initial shop tables) |
Falterfire (talk | contribs) (Moved to generic getShopTable) |
||
Line 69: | Line 69: | ||
end | end | ||
function p. | function p._getShopTable(Purchases) | ||
local result = '{| class="wikitable sortable stickyHeader"' | local result = '{| class="wikitable sortable stickyHeader"' | ||
result = result..'\r\n|- class="headerRow-0"' | result = result..'\r\n|- class="headerRow-0"' | ||
Line 103: | Line 103: | ||
end | end | ||
function p. | function p.getShopTable(frame) | ||
local cat = frame.args ~= nil and frame.args[1] or frame | |||
local shopCat = ShopData.Shop[cat] | |||
if shopCat == nil then | |||
return 'ERROR: Invalid category '..cat..'[[Category:Pages with script errors]]' | |||
else | |||
return p._getShopTable(shopCat) | |||
end | |||
end | end | ||
return p | return p |