Module:Exercises/Game Links 1/5

local p = {}

function p.Main(frame) return p.main(frame:getParent.args) end

function p.main(args) local game = args[1] -- renamed "msg" to "game" for clarity local fullTitle -- This needs to be declared here due to lexical scoping if game == "The Legend of Zelda" then fullTitle = "The Legend of Zelda (Game)" elseif game == "The Adventure of Link" then fullTitle = "Zelda II: The Adventure of Link" else fullTitle = "The Legend of Zelda: " .. game end local link = string.format("%s", fullTitle, game) return "*" .. link end

return p