Module:Scenario

From Heroes 3 wiki
Revision as of 20:55, 5 February 2024 by Imahero (talk | contribs) (Created page with "local p = {} function p.players(frame) local num_players = tonumber(frame.args[1]) or 0 local conj_players = num_players == 1 and 'Player' or 'Players' return conj_players end return p")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

usage[edit | hide]

2 {{#invoke:scenario|players|2}}, 1 {{#invoke:scenario|players|1}}

2 Players, 1 Player


local p = {}

function p.players(frame)
	local num_players = tonumber(frame.args[1]) or 0
	local conj_players = num_players == 1 and 'Player' or 'Players'
    return conj_players													
end

return p