Module:ItemSources: Difference between revisions

From Discord Dungeons Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 15: Line 15:
local args = frame:getParent().args
local args = frame:getParent().args
mw.log("args", inspect(data))
mw.log("args", inspect(data))
local storeList


local status, data = pcall(function()
local status, data = pcall(function()
storeLocationsList.main(frame)
storeList = storeLocationsList.main(frame)
end)
end)


Line 26: Line 28:
if status then
if status then
mw.log("no error")
mw.log("no error")
mw.log("data", inspect(data))
mw.log("storeList", inspect(storeList))
else
else
mw.log("error")
mw.log("error")

Revision as of 12:22, 4 April 2022

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

--------------------------
-- Module for [[Template:ItemSources]]
--
--
------------------------
local p = {}

local storeLocationsList = require('Module:Store locations list')
local onmain = require('Module:Mainonly').on_main
local commas = require('Module:Addcommas')._add
local inspect = require('Module:Inspect')
VariablesLua = mw.ext.VariablesLua

function p.main(frame)
	local args = frame:getParent().args
	mw.log("args", inspect(data))

	local storeList

	
	local status, data = pcall(function()
		storeList = storeLocationsList.main(frame)
	end)

	mw.log("status", status)


	if status then
		mw.log("no error")
		mw.log("storeList", inspect(storeList))
	else
		mw.log("error")
		mw.log("error data", data)
	end
end



return p