Template:Invoke
Revision as of 04:23, 12 November 2019 by imported>Ans (+{{doc}})
| This template's documentation is missing, inadequate, or does not accurately describe its functionality and/or the parameters in its code. Please help to expand and improve it. (May 2019) |
| This template uses Lua: |
This template can be used to debug template parameters.
Usage
- {{Invoke|module name|function name|arguments ...}}
Example
- {{Invoke|math|random}} --> 0.44916348459626
- {{Invoke|math|min|9|7|8}} --> 7
- {{Invoke|LuaCall|call|mw.dumpObject| arg1 |unnamed parameter}} --> Lua error: bad argument #1 to 'gsub' (string expected, got nil).
- {{Invoke|LuaCall|call|mw.dumpObject|4= arg1 |5=named parameter}} --> Lua error: bad argument #1 to 'gsub' (string expected, got nil).
- {{Invoke|LuaCall|call|mw.dumpObject| <newline>arg1<newline> |unnamed parameter}} --> Lua error: bad argument #1 to 'gsub' (string expected, got nil).
- {{Invoke|LuaCall|call|mw.dumpObject|4= <newline>arg1<newline> |5=named parameter}} --> Lua error: bad argument #1 to 'gsub' (string expected, got nil).
- {{Invoke|LuaCall|call|mw.dumpObject|<newline> arg1 <newline>|unnamed parameter}} --> Lua error: bad argument #1 to 'gsub' (string expected, got nil).
- {{Invoke|LuaCall|call|mw.dumpObject|4=<newline> arg1 <newline>|5=named parameter}} --> Lua error: bad argument #1 to 'gsub' (string expected, got nil).
- {{Invoke|LuaCall|call|mw.dumpObject|<>}} {{Invoke|LuaCall|call|mw.logObject|<>}} {{Invoke|LuaCall|call|mw.text.nowiki|<>}} --> Lua error: bad argument #1 to 'gsub' (string expected, got nil). Lua error: bad argument #1 to 'gsub' (string expected, got nil). Lua error: bad argument #1 to 'gsub' (string expected, got nil).
- {{Invoke|LuaCall|call|mw.text.nowiki|<pre>pre text</pre>}} --> Lua error: bad argument #1 to 'gsub' (string expected, got nil).
- {{Invoke|LuaCall|call|mw.text.nowiki|<nowiki>nowiki text</nowiki>}} --> Lua error: bad argument #1 to 'gsub' (string expected, got nil).
- {{Invoke|LuaCall|call|mw.text.nowiki|<ref>ref text</ref>}} --> Lua error: bad argument #1 to 'gsub' (string expected, got nil).
- {{Invoke|LuaCall|call|mw.text.nowiki|<code>code text</code>}} --> Lua error: bad argument #1 to 'gsub' (string expected, got nil).
- {{Invoke|LuaCall|call|mw.text.nowiki|<syntaxhighlight lang=php>source text</syntaxhighlight>}} --> Lua error: bad argument #1 to 'gsub' (string expected, got nil).
- {{Invoke|LuaCall|call|mw.text.nowiki|{{ping|User1}}}} --> Lua error: bad argument #1 to 'gsub' (string expected, got nil).
- {{Invoke|LuaCall|call|mw.text.nowiki|[[User:User1]]}} --> Lua error: bad argument #1 to 'gsub' (string expected, got nil).
- {{Invoke|LuaCall|call|mw.text.nowiki|<ref>ref then <nowiki>nowiki</nowiki></ref>}} --> Lua error: bad argument #1 to 'gsub' (string expected, got nil).
- {{Invoke|LuaCall|call|mw.text.nowiki|<pre>pre then <nowiki>nowiki</nowiki></pre>}} --> Lua error: bad argument #1 to 'gsub' (string expected, got nil).
- {{Invoke|LuaCall|call|mw.text.nowiki|{{replace|<tag>tag text</tag>|tag|pre}}{{replace|<tag>tag text</tag>|tag|nowiki}}{{replace|<tag>tag text</tag>|tag|ref}}{{replace|<tag>tag text</tag>|tag|code}}{{replace|1=<tag lang=php>tag text</tag>|2=tag|3=syntaxhighlight}}}} --> Lua error: bad argument #1 to 'gsub' (string expected, got nil).
- {{Invoke|LuaCall|call|mw.text.nowiki|4={{1x|<}}pre>pre text</pre>{{1x|<}}nowiki>nowiki text</nowiki>{{1x|<}}ref>ref text</ref>{{1x|<}}code>code text</code>{{1x|<}}syntaxhighlight lang=php>source text</syntaxhighlight>}} --> Lua error: bad argument #1 to 'gsub' (string expected, got nil).
| The above documentation is transcluded from Template:Invoke/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |