<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.herc.ws/w/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.herc.ws/w/index.php?action=history&amp;feed=atom&amp;title=Getarg</id>
		<title>Getarg - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.herc.ws/w/index.php?action=history&amp;feed=atom&amp;title=Getarg"/>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/w/index.php?title=Getarg&amp;action=history"/>
		<updated>2026-05-03T16:38:32Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.21.11</generator>

	<entry>
		<id>https://wiki.herc.ws/w/index.php?title=Getarg&amp;diff=465&amp;oldid=prev</id>
		<title>Via: Created page with &quot;== Syntax == *'''getarg'''(&lt;index&gt;[, &lt;default value&gt;]); *'''getarg'''(&lt;index&gt;[, &lt;&quot;default value&quot;&gt;]);  == Description == This function retrieves a parameter inside a function, ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.herc.ws/w/index.php?title=Getarg&amp;diff=465&amp;oldid=prev"/>
				<updated>2013-06-09T09:38:06Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Syntax == *&amp;#039;&amp;#039;&amp;#039;getarg&amp;#039;&amp;#039;&amp;#039;(&amp;lt;index&amp;gt;[, &amp;lt;default value&amp;gt;]); *&amp;#039;&amp;#039;&amp;#039;getarg&amp;#039;&amp;#039;&amp;#039;(&amp;lt;index&amp;gt;[, &amp;lt;&amp;quot;default value&amp;quot;&amp;gt;]);  == Description == This function retrieves a parameter inside a function, ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Syntax ==&lt;br /&gt;
*'''getarg'''(&amp;lt;index&amp;gt;[, &amp;lt;default value&amp;gt;]);&lt;br /&gt;
*'''getarg'''(&amp;lt;index&amp;gt;[, &amp;lt;&amp;quot;default value&amp;quot;&amp;gt;]);&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
This function retrieves a parameter inside a function, which was passed into an invoking [[callsub]] or [[callfunc]] call. The parameters are referred to by an zero-based ''index'', which means, the first parameter has index 0, the second parameter 1, and so on. Optionally a ''default value'' can be specified, which will be used, when no parameter was passed with given index (optional parameter functionality for script functions).&lt;br /&gt;
&lt;br /&gt;
If there is no such parameter at given index and no default value exists, or if the invoking script is not a function, the script terminates with an error.&lt;br /&gt;
&lt;br /&gt;
The parameter ''default value'' is available since {{rev|10773}}.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
     [[callsub]] L_dosomething, &amp;quot;toast&amp;quot;;&lt;br /&gt;
     [[end]];&lt;br /&gt;
 L_dosomething:&lt;br /&gt;
     [[mes]] &amp;quot;*does something with a &amp;quot;+getarg(0, &amp;quot;not recognized thing&amp;quot;)+&amp;quot;*&amp;quot;;&lt;br /&gt;
     [[close2]];&lt;br /&gt;
     [[return]];&lt;br /&gt;
This results in message ''*does something with a toast*''. If &amp;quot;toast&amp;quot; were not passed as parameter, the message would be ''*does something with a not recognized thing*''.&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Command]]&lt;/div&gt;</summary>
		<author><name>Via</name></author>	</entry>

	</feed>