Module:Sandbox/User:Alsang/PriceChecker: Difference between revisions

no edit summary
m (Undo revision 55025 by Californ1a (talk))
Tag: Undo
No edit summary
(One intermediate revision by the same user not shown)
Line 6:
-- other parameters are determined by subqueries of chained pages
local query = {
'[[-Sold item.Shop sell price::~*+]]',
'?=Name',
'?-Sold item.Shop sell price=ShopValue',
Line 17:
local out = {}
for _,item in ipairs(results) do
iflocal i not(tonumber(item.ShopValue)== tonumber(item.InfoboxValue)) then
local s = item.ShopValue
local add = true
if type(s)=='string' then
if i==tonumber(s) or not(tonumber(s)) then
add = false
end
elseif type(s)=='table' then
for _,shop in ipairs(s) do
if i==tonumber(shop) or not(tonumber(shop)) then
add = false
end
end
end
if add then
table.insert(out,item.Name)
end
21,580

edits