Difference between revisions of "Module:Pokémon"

From Story Lists
Jump to navigation Jump to search
(Created page with "local p = {} local dex = require("Module:Pokédex") function p.pokedex(frame) result = "" for i, v in ipairs( dex ) do result = result .. ":" .. i .. ": " .. v .. "\n"...")
 
 
Line 3: Line 3:


function p.pokedex(frame)
function p.pokedex(frame)
result = ""
for i, v in ipairs( dex ) do
result = result .. ", " .. v
end
return result
end
function p.pokedexLong (frame)
result = ""
result = ""



Latest revision as of 10:51, 26 May 2021

Documentation for this module may be created at Module:Pokémon/doc

local p = {}
local dex = require("Module:Pokédex")

function p.pokedex(frame)
	result = ""

	for i, v in ipairs( dex ) do
		result = result .. ", " .. v
	end

	return result
end

function p.pokedexLong (frame)
	result = ""

	for i, v in ipairs( dex ) do
		result = result .. ":" .. i .. ": " .. v .. "\n"
	end

	return result
end

return p