Template:Invoke

From blackwiki
Revision as of 04:23, 12 November 2019 by imported>Ans (+{{doc}})
Jump to navigation Jump to search
Template documentation[view] [edit] [history] [purge]

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|&lt;&gt;}} {{Invoke|LuaCall|call|mw.logObject|&lt;&gt;}} {{Invoke|LuaCall|call|mw.text.nowiki|&lt;&gt;}} --> 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).