Toggle menu
15
236
93
27.9K
Kenshi Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Params/doc/examples/check for unknown parameters/doc: Difference between revisions

From Kenshi Wiki
Prd (talk | contribs)
No edit summary
Prd (talk | contribs)
No edit summary
Line 42: Line 42:
<includeonly>{{Sandbox other||
<includeonly>{{Sandbox other||
<!-- Categories below this line; interwikis at Wikidata -->
<!-- Categories below this line; interwikis at Wikidata -->
[[Category:Module misc pages]]
 
[[Category:Module fourth misc]]
}}</includeonly><noinclude>
}}</includeonly><noinclude>
[[Category:Module documents]]
[[Category:Module documents]]
[[Category:Module misc documents]]
[[Category:Module misc documents]]
</noinclude>
</noinclude>

Revision as of 21:04, 9 March 2025

This example template shows to use {{#invoke:params|discarding|...}} to check for unknown parameters.

Usage

For instance, writing

{{module:params/doc/examples/check for unknown parameters
	| hello = world
	| wind = surfing
}}

will generate

Everything is good: do something

while writing

{{module:params/doc/examples/check for unknown parameters
	| hello = world
	| wind = surfing
	| wrong = ups!
}}

will generate

Error: The only parameters accepted are |hello= and |wind=.

For simple cases like this specialized modules are available; you might want to have a look at:

Contents