Module:EcoVersionString

From Eco - English Wiki
Revision as of 00:34, 26 February 2022 by Demian (talk | contribs) (Created page with "local p = {} local VersionData = mw.loadData("Module:EcoVersion") function p.main() assert(VersionData.eco, "Failed to load data from Module:EcoVersion!") local ecoVersionString = VersionData.eco["eco"]["ecoVersion"] if ecoVersionString then return ecoVersionString else return "<span style=\"color:red\">ERROR: Failed to load Eco version from data file.</span>" end end return p")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

local p = {}
local VersionData = mw.loadData("Module:EcoVersion")

function p.main()
	assert(VersionData.eco, "Failed to load data from Module:EcoVersion!")

	local ecoVersionString = VersionData.eco["eco"]["ecoVersion"]
	
	if ecoVersionString then
		return ecoVersionString
	else
		return "<span style=\"color:red\">ERROR: Failed to load Eco version from data file.</span>"
	end
end

return p