<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.stiles.casa/index.php?action=history&amp;feed=atom&amp;title=Module%3ALuaCall%2Fdoc</id>
	<title>Module:LuaCall/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.stiles.casa/index.php?action=history&amp;feed=atom&amp;title=Module%3ALuaCall%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://wiki.stiles.casa/index.php?title=Module:LuaCall/doc&amp;action=history"/>
	<updated>2026-05-07T05:17:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.2</generator>
	<entry>
		<id>https://wiki.stiles.casa/index.php?title=Module:LuaCall/doc&amp;diff=5797&amp;oldid=prev</id>
		<title>Maxwells: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.stiles.casa/index.php?title=Module:LuaCall/doc&amp;diff=5797&amp;oldid=prev"/>
		<updated>2022-06-11T21:01:53Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:01, 11 June 2022&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key wikidb:diff::1.12:old-5796:rev-5797 --&gt;
&lt;/table&gt;</summary>
		<author><name>Maxwells</name></author>
	</entry>
	<entry>
		<id>https://wiki.stiles.casa/index.php?title=Module:LuaCall/doc&amp;diff=5796&amp;oldid=prev</id>
		<title>50.53.12.84: cleanup markup</title>
		<link rel="alternate" type="text/html" href="https://wiki.stiles.casa/index.php?title=Module:LuaCall/doc&amp;diff=5796&amp;oldid=prev"/>
		<updated>2021-12-29T15:41:40Z</updated>

		<summary type="html">&lt;p&gt;cleanup markup&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Module rating|alpha}}&lt;br /&gt;
&lt;br /&gt;
This module allows you to call any one single preinstalled Lua function, so that you don&amp;#039;t need to write a module for one desired feature.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&lt;br /&gt;
===Main===&lt;br /&gt;
{{tlc|#invoke:LuaCall|main|{{var|arbitrary variables}}|{{var|parameters}}|{{var|functioncall}}}}&lt;br /&gt;
&lt;br /&gt;
The {{var|arbitrary variables}} are any key of your choice &amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt; any value of your choice. Values are interpreted as strings unless {{code|tonumber(value)|lua}} isn&amp;#039;t {{code|nil|lua}}, i.e. numbers should be converted to the numeric type. No effort is made to interpret tables.&lt;br /&gt;
&lt;br /&gt;
The {{var|parameters}} all begin with &amp;lt;code&amp;gt;reserved_&amp;lt;/code&amp;gt;, which arbitrary variable should use.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;reserved_return&amp;lt;/code&amp;gt; sets which output from the function you want, and defaults to 1. For example, setting it to 2 for mw.ustring.gsub will return the number of replacements made.&lt;br /&gt;
* &amp;lt;code&amp;gt;reserved_debug&amp;lt;/code&amp;gt; - nonzero value forces display of a not particularly useful debug text&lt;br /&gt;
&lt;br /&gt;
The {{var|functioncall}} is written as &amp;lt;code&amp;gt;{{var|some.function.name}}({{var|a,b,c}})&amp;lt;/code&amp;gt; where {{var|some.function.name}} means something in the [[mw:Extension:Scribunto/Lua reference manual|Extension:Scribunto/Lua reference manual]] and {{var|a,b,c}} are the arbitrary variable names you&amp;#039;ve chosen.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Main===&lt;br /&gt;
*{{demo inline|&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|main|a=test&amp;amp;nbsp;|b=7|string.rep(a,b)}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
*{{demo inline|&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|main|pattern=(%a)|replace=%1.|string=I can&amp;#039;t get no satisfaction|mw.ustring.gsub(string,pattern,replace)|reserved_return=1}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
*{{demo inline|&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|main|pattern=(%a)|replace=%1.|string=I can&amp;#039;t get no satisfaction|mw.ustring.gsub(string,pattern,replace)|reserved_return=2}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
*{{demo inline|&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|main|value=1.4512|math.ceil(value)}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
*{{demo inline|&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|main|value=1.4512|math.modf(value)}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
*{{demo inline|&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|main|value=1.4512|math.modf(value)|reserved_return=2}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
*{{demo inline|&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|main|mw.text.nowiki(s)|s={{URL|1=https://www.Amazon.com/}}}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
===Call===&lt;br /&gt;
*{{demo inline|&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|call|string.format|%04x|127}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
*{{demo inline|&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|call|math.modf|1.4512}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
*{{demo inline|&amp;lt;nowiki&amp;gt;{{#invoke:LuaCall|call|math.modf|1.4512|return=2}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
==Errors==&lt;br /&gt;
The module &amp;#039;&amp;#039;&amp;#039;may&amp;#039;&amp;#039;&amp;#039; generate script errors — whenever your call is not valid Lua code, you see the error you would normally have. For example,&lt;br /&gt;
&lt;br /&gt;
{{demo inline|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
{{#invoke:LuaCall|main|value=1.4512|math.fmod(value)}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
because the second value is lacking. No effort is made to trap these.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox | |&lt;br /&gt;
&amp;lt;!-- Template categories below this line, please --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>50.53.12.84</name></author>
	</entry>
</feed>