Module:Test: Difference between revisions

From Roat Pkz
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:
-- Function to get price by item name
-- Function to get price by item name
function prices.getPrice(itemName)
function prices.getPrice(itemName)
     local data = mw.loadData("Module:GEPrices/data")
     local data = mw.loadData("Module:GEPrices/data.json")
     return data[itemName] or nil
     return data[itemName] or nil
end
end


return prices
return prices

Revision as of 22:18, 3 April 2024

Documentation for this module may be created at Module:Test/doc

-- Module table
local prices = {}

-- Function to get price by item name
function prices.getPrice(itemName)
    local data = mw.loadData("Module:GEPrices/data.json")
    return data[itemName] or nil
end

return prices