Module:EcoVersionString: Difference between revisions

From Eco - English Wiki
[unchecked revision][checked revision]
No edit summary
Tag: Reverted
Undo revision 8689 by JordanRodriguez (talk)
Tag: Undo
Line 11: Line 11:
else
else
return "<span style=\"color:red\">ERROR: Failed to load Eco version from data file.</span>"
return "<span style=\"color:red\">ERROR: Failed to load Eco version from data file.</span>"
end
end
end


return p
return p
end

Revision as of 05:09, 20 September 2022


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