Module:EcoVersionString: Difference between revisions
From Eco - English Wiki
[checked revision] | [checked revision] |
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
local EcoVersionString = VersionData.eco["eco"]["ecoVersion"] | local EcoVersionString = VersionData.eco["eco"]["ecoVersion"] | ||
if | if EcoVersionString then | ||
return EcoVersionString | return EcoVersionString | ||
else | else |
Revision as of 12:15, 25 June 2024
local p = {}
function p.main()
local VersionData = mw.loadData("Module:EcoVersionData")
assert(VersionData.eco, "Failed to load Data from Module:EcoVersionData!")
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.</span>"
end
end
return p