Modul:Goalscorers: Perbedaan antara revisi
Konten dihapus Konten ditambahkan
Tidak ada ringkasan suntingan |
Tidak ada ringkasan suntingan |
||
Baris 782:
--getArgs(frame)
--[[
{{#if:{{{own_goals|}}}| (dengan {{{own_goals}}} gol di antaranya termasuk ke dalam
{{formatnum: {{#expr:{{{goals}}}/{{{matches}}} round 2}}}}
{{#if:{{{further|}}}|{{#if:{{{assists|}}}|| }}{{{further}}}|}}
--]]
local statNumber = g.args['goals'] or g.args['assists'] or 0
local matches = g.args['matches']
local statType = "
if g.args['assists'] then statType = "
if g.args['clean sheets'] then statType = "
local ongoing = g.args['ongoing']
local text1 = "
if g.args['lc'] then text1 = "there" end
local updateString = ""
local averageString = ""
if g.args['goals'] and g.args['matches'] then
local averageGoals = g.args['goals']/g.args['matches']
averageString = string.format("
▲ averageString = string.format(" in %d match%s, for an average of %.3g goal%s per match", g.args['matches'], matchPlural, averageGoals, avGoalPlural)
end
if g.args['updated'] and g.args['updated'] ~= "complete" then
updateString = " (
end
local
if g.args['sep'] then sep = g.args['sep'] end
local text = ""
if g.args['goals'] then
text = string.format("
text1
end
text = p.addAdditionHeaderText(text) -- handles template parameters bold, further, extra
Baris 852 ⟶ 836:
if number < 0 then
entry = g.args[math.abs(number) .. ' own goals'] or g.args[math.abs(number) .. ' own goal']
statType = "
end
local plural = "s"
Baris 867 ⟶ 851:
end
if statType == "
if g.args['goals'] and totalGoals ~= tonumber(g.args['goals']) then
mw.addWarning("
end
end
Baris 888 ⟶ 872:
--{{#if:{{{source|}}}|{{small|Source: {{{source}}}}}|}}
local source = g.args['source'] or ""
if source ~= "" then source = "<small>
return text .. output .. footer .. source
|