User:GuyPerfect/Lua: Difference between revisions

From Inkipedia, the Splatoon wiki
mNo edit summary
(Proof of concept gear infobox)
Line 1: Line 1:
=== Invocation ===
<nowiki>{{#invoke:GuyPerfect|gear
|game=S2
|category=Clothing
|name=Octo Tee
|brand=Cuttlegear
|ability=Haunt
|cost=8,888
|splatnet2=13,332
|rarity=3
}}</nowiki>
=== Output ===
{{#invoke:GuyPerfect|gear
|game=S2
|category=Clothing
|name=Octo Tee
|brand=Cuttlegear
|ability=Haunt
|cost=8,888
|splatnet2=13,332
|rarity=3
}}
=== Module ===
=== Module ===
[[Module:GuyPerfect]]
[[Module:GuyPerfect]]
{{#tag:pre|{{Module:GuyPerfect}}}}
{{#tag:pre|{{Module:GuyPerfect}}}}
=== Invocation ===
<nowiki>{{#invoke:GuyPerfect|hello|foo|named=value|bar}}</nowiki>
=== Output ===
{{#invoke:GuyPerfect|hello|foo|named=value|bar}}

Revision as of 01:46, 16 April 2021

Invocation

{{#invoke:GuyPerfect|gear
|game=S2
|category=Clothing
|name=Octo Tee
|brand=Cuttlegear
|ability=Haunt
|cost=8,888
|splatnet2=13,332
|rarity=3
}}

Output

Script error: The function "gear" does not exist.

Module

Module:GuyPerfect

function Infobox(frame)
	local ret = ""
	for k,v in frame:argumentPairs() do
		ret = ret .. k .. " = " .. v .. "<br>"
	end
	return ret
end

-- Module
return {
    infobox = Infobox
}