<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.computercraft.info/wiki/index.php?action=history&amp;feed=atom&amp;title=Task_complete_%28event%29</id>
		<title>Task complete (event) - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://www.computercraft.info/wiki/index.php?action=history&amp;feed=atom&amp;title=Task_complete_%28event%29"/>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Task_complete_(event)&amp;action=history"/>
		<updated>2026-07-11T09:23:33Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Task_complete_(event)&amp;diff=6927&amp;oldid=prev</id>
		<title>MKlegoman357: Updated to ComputerCraft 1.71</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Task_complete_(event)&amp;diff=6927&amp;oldid=prev"/>
				<updated>2015-02-23T16:15:45Z</updated>
		
		<summary type="html">&lt;p&gt;Updated to ComputerCraft 1.71&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 16:15, 23 February 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 27:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed. Otherwise returned object 4 takes it's place, fallowed by returned object 5&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed. Otherwise returned object 4 takes it's place, fallowed by returned object 5&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return4={{type|boolean}} commandResult - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the command was executed successfully and returned positive value (a /testfor found a player), &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; if the command was not executed (invalid command or wrong arguments passed to the command) or it returned negative value (a /testfor didn't find a player)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return4={{type|boolean}} commandResult - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the command was executed successfully and returned positive value (a /testfor found a player), &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; if the command was not executed (invalid command or wrong arguments passed to the command) or it returned negative value (a /testfor didn't find a player)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return5=&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[&amp;lt;nowiki/&amp;gt;&lt;/del&gt;{{type|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;string&lt;/del&gt;}} &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;error] &lt;/del&gt;- &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;if &amp;lt;var&amp;gt;commandResult&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is &lt;/del&gt;the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;error message saying why &lt;/del&gt;the command &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;failed&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return5={{type|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;table&lt;/ins&gt;}} &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;output &lt;/ins&gt;- the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;output of &lt;/ins&gt;the command &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;as a numerically-indexed table&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Example&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Example&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 53:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 53:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; if errorMessage then&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; if errorMessage then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  [[print]]( &amp;quot;An error has occurred: &amp;quot;, errorMessage )&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  [[print]]( &amp;quot;An error has occurred: &amp;quot;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[textutils.serialize]]( &lt;/ins&gt;errorMessage &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;) &lt;/ins&gt;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; elseif arePlayersAround then&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; elseif arePlayersAround then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  [[print]]( &amp;quot;There is one or more players around me.&amp;quot; )&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  [[print]]( &amp;quot;There is one or more players around me.&amp;quot; )&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key ccraft_wiki-mw_:diff:version:1.11a:oldid:6877:newid:6927 --&gt;
&lt;/table&gt;</summary>
		<author><name>MKlegoman357</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Task_complete_(event)&amp;diff=6877&amp;oldid=prev</id>
		<title>MKlegoman357: Fixed spelling mistake</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Task_complete_(event)&amp;diff=6877&amp;oldid=prev"/>
				<updated>2015-02-16T19:33:43Z</updated>
		
		<summary type="html">&lt;p&gt;Fixed spelling mistake&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 19:33, 16 February 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Event&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Event&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|name=task_complete&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|name=task_complete&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|desc=Fired when an asynchronous task completes. Used by every [[commands_(API)|commands API]] method which yields, including [[commands.execAsync]](), but excluding [[commands.getBlockPosition]](). Also used internally by every [[Command_Block_(API)|command block's &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;method&lt;/del&gt;]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|desc=Fired when an asynchronous task completes. Used by every [[commands_(API)|commands API]] method which yields, including [[commands.execAsync]](), but excluding [[commands.getBlockPosition]](). Also used internally by every [[Command_Block_(API)|command block's &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;methods&lt;/ins&gt;]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return1={{type|number}} taskID - the ID number of the task&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return1={{type|number}} taskID - the ID number of the task&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key ccraft_wiki-mw_:diff:version:1.11a:oldid:6872:newid:6877 --&gt;
&lt;/table&gt;</summary>
		<author><name>MKlegoman357</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Task_complete_(event)&amp;diff=6872&amp;oldid=prev</id>
		<title>MKlegoman357: Fixed/Improved</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Task_complete_(event)&amp;diff=6872&amp;oldid=prev"/>
				<updated>2015-02-16T19:23:45Z</updated>
		
		<summary type="html">&lt;p&gt;Fixed/Improved&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 19:23, 16 February 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 25:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 25:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return1={{type|number}} taskID - the ID number of the task&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return1={{type|number}} taskID - the ID number of the task&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed. Otherwise returned object 4 takes it's place, fallowed by returned object 5&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, 6, etc..&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed. Otherwise returned object 4 takes it's place, fallowed by returned object 5&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return4={{type|boolean}} commandResult - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the command was executed successfully and returned positive value (a /testfor found a player), &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; if the command was not executed (invalid command or wrong arguments passed to the command) or it returned negative value (a /testfor didn't find a player)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return4={{type|boolean}} commandResult - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the command was executed successfully and returned positive value (a /testfor found a player), &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; if the command was not executed (invalid command or wrong arguments passed to the command) or it returned negative value (a /testfor didn't find a player)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return5=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;commandResult&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the command failed&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return5=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;commandResult&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the command failed&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 36:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 36:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; local arePlayersAround&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; local arePlayersAround&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; local errorMessage&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; local errorMessage&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;repeat&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;while true do&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  local event, id, success, executed, error = [[os.pullEvent]]( [[task_complete_(event)|&amp;quot;task_complete&amp;quot;]] )&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  local event, id, success, executed, error = [[os.pullEvent]]( [[task_complete_(event)|&amp;quot;task_complete&amp;quot;]] )&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160;  &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160;  arePlayersAround = success and executed&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  if id == taskID then&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  if id == taskID then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160;  arePlayersAround = success and executed&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160;  &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;  if not success then&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;  if not success then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160;  errorMessage = executed&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160;  errorMessage = executed&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 47:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 47:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160;  errorMessage = error&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160;  errorMessage = error&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;  end&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160;  end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160;  &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160;  break&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  end&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160;  end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;until id == taskID&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;end&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; if errorMessage then&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; if errorMessage then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 65:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 67:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return1={{type|number}} taskID - the ID number of the task&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return1={{type|number}} taskID - the ID number of the task&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed. Otherwise returned object 4 takes it's place&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, fallowed by returned object 5, 6, etc..&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed. Otherwise returned object 4 takes it's place&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return4={{type|table}} commands - a numerically indexed table filled with strings representing acceptable commands for [[commands.exec]]() / [[commands.execAsync]]()&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return4={{type|table}} commands - a numerically indexed table filled with strings representing acceptable commands for [[commands.exec]]() / [[commands.execAsync]]()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 75:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 77:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return1={{type|number}} taskID - the ID number of the task&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return1={{type|number}} taskID - the ID number of the task&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed. Otherwise returned object 4 takes it's place&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, fallowed by returned object 5, 6, etc..&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed. Otherwise returned object 4 takes it's place&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return4={{type|table}} blockInfo - a table containing information on the block at the specified world co-ordinate&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return4={{type|table}} blockInfo - a table containing information on the block at the specified world co-ordinate&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 85:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 87:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return1={{type|number}} taskID - the ID number of the task&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return1={{type|number}} taskID - the ID number of the task&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed. Otherwise returned object 4 takes it's place&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, fallowed by returned object 5, 6, etc..&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed. Otherwise returned object 4 takes it's place&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return4={{type|string}} command - the command in the command block&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return4={{type|string}} command - the command in the command block&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 95:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 97:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return1={{type|number}} taskID - the ID number of the task&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return1={{type|number}} taskID - the ID number of the task&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;. Otherwise returned object 4 takes it's place, fallowed by returned object 5, 6, etc.&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 104:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 106:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return1={{type|number}} taskID - the ID number of the task&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return1={{type|number}} taskID - the ID number of the task&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed. Otherwise returned object 4 takes it's place, fallowed by returned object 5&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, 6, etc..&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed. Otherwise returned object 4 takes it's place, fallowed by returned object 5&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return4={{type|boolean}} commandResult - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the command was executed successfully and returned positive value (a /testfor found a player), &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; if the command was not executed (invalid command or wrong arguments passed to the command) or it returned negative value (a /testfor didn't find a player)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return4={{type|boolean}} commandResult - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the command was executed successfully and returned positive value (a /testfor found a player), &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; if the command was not executed (invalid command or wrong arguments passed to the command) or it returned negative value (a /testfor didn't find a player)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return5=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;commandResult&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the command failed&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|return5=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;commandResult&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the command failed&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key ccraft_wiki-mw_:diff:version:1.11a:oldid:6871:newid:6872 --&gt;
&lt;/table&gt;</summary>
		<author><name>MKlegoman357</name></author>	</entry>

	<entry>
		<id>https://www.computercraft.info/wiki/index.php?title=Task_complete_(event)&amp;diff=6871&amp;oldid=prev</id>
		<title>MKlegoman357: Created page with &quot;{{Event |name=task_complete |desc=Fired when an asynchronous task completes. Used by every commands API method which yields, including [[commands.execAsync]...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.computercraft.info/wiki/index.php?title=Task_complete_(event)&amp;diff=6871&amp;oldid=prev"/>
				<updated>2015-02-16T19:17:17Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Event |name=task_complete |desc=Fired when an asynchronous task completes. Used by every &lt;a href=&quot;/wiki/Commands_(API)&quot; title=&quot;Commands (API)&quot;&gt;commands API&lt;/a&gt; method which yields, including [[commands.execAsync]...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Event&lt;br /&gt;
|name=task_complete&lt;br /&gt;
|desc=Fired when an asynchronous task completes. Used by every [[commands_(API)|commands API]] method which yields, including [[commands.execAsync]](), but excluding [[commands.getBlockPosition]](). Also used internally by every [[Command_Block_(API)|command block's method]].&lt;br /&gt;
|return1={{type|number}} taskID - the ID number of the task&lt;br /&gt;
|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;br /&gt;
|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed. Otherwise returned object 4 takes it's place, fallowed by returned object 5, 6, etc..&lt;br /&gt;
|return4={{type|any}} param1, param2, ... - parameters, returned by the task&lt;br /&gt;
}}&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Waits for any task to complete and prints it's ID, if it succeeded and if not succeeded the error message.&lt;br /&gt;
|code=local event, taskID, success, error = '''os.pullEvent( &amp;quot;task_complete&amp;quot; )'''&lt;br /&gt;
 &lt;br /&gt;
 [[print]]( &amp;quot;Task ID: &amp;quot;, taskID )&lt;br /&gt;
 [[print]]( &amp;quot;Task succeeded: &amp;quot;, success )&lt;br /&gt;
 &lt;br /&gt;
 if not success then&lt;br /&gt;
   [[print]]( &amp;quot;Error: &amp;quot;, error )&lt;br /&gt;
 end&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==[[commands.exec]]()/[[commands.execAsync]]()==&lt;br /&gt;
{{Event&lt;br /&gt;
|name=task_complete&lt;br /&gt;
|desc=Fired when [[commands.exec]]()/[[commands.execAsync]]() is executed. This is used internally by [[commands.exec]]() and it is not needed to be used by the user.&lt;br /&gt;
|return1={{type|number}} taskID - the ID number of the task&lt;br /&gt;
|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;br /&gt;
|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed. Otherwise returned object 4 takes it's place, fallowed by returned object 5, 6, etc..&lt;br /&gt;
|return4={{type|boolean}} commandResult - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the command was executed successfully and returned positive value (a /testfor found a player), &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; if the command was not executed (invalid command or wrong arguments passed to the command) or it returned negative value (a /testfor didn't find a player)&lt;br /&gt;
|return5=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;commandResult&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the command failed&lt;br /&gt;
}}&lt;br /&gt;
{{Example&lt;br /&gt;
|desc=Checks if there are any players around the [[Command Computer]] in 2 block radius.&lt;br /&gt;
|code=local radius = 2&lt;br /&gt;
 local taskID = [[commands.execAsync]]( &amp;quot;testfor @a[r=&amp;quot; .. radius .. &amp;quot;]&amp;quot;)'''&lt;br /&gt;
 &lt;br /&gt;
 local arePlayersAround&lt;br /&gt;
 local errorMessage&lt;br /&gt;
 repeat&lt;br /&gt;
   local event, id, success, executed, error = [[os.pullEvent]]( [[task_complete_(event)|&amp;quot;task_complete&amp;quot;]] )&lt;br /&gt;
   &lt;br /&gt;
   arePlayersAround = success and executed&lt;br /&gt;
   &lt;br /&gt;
   if id == taskID then&lt;br /&gt;
     if not success then&lt;br /&gt;
       errorMessage = executed&lt;br /&gt;
     elseif not executed then&lt;br /&gt;
       errorMessage = error&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
 until id == taskID&lt;br /&gt;
 &lt;br /&gt;
 if errorMessage then&lt;br /&gt;
   [[print]]( &amp;quot;An error has occurred: &amp;quot;, errorMessage )&lt;br /&gt;
 elseif arePlayersAround then&lt;br /&gt;
   [[print]]( &amp;quot;There is one or more players around me.&amp;quot; )&lt;br /&gt;
 else&lt;br /&gt;
   [[print]]( &amp;quot;There are no players around me.&amp;quot; )&lt;br /&gt;
 end&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==[[commands.list]]()==&lt;br /&gt;
{{Event&lt;br /&gt;
|name=task_complete&lt;br /&gt;
|desc=Fired when [[commands.list]]() completes. This is used internally by the function itself and it is not needed to be used by the user.&lt;br /&gt;
|return1={{type|number}} taskID - the ID number of the task&lt;br /&gt;
|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;br /&gt;
|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed. Otherwise returned object 4 takes it's place, fallowed by returned object 5, 6, etc..&lt;br /&gt;
|return4={{type|table}} commands - a numerically indexed table filled with strings representing acceptable commands for [[commands.exec]]() / [[commands.execAsync]]()&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==[[commands.getBlockInfo]]()==&lt;br /&gt;
{{Event&lt;br /&gt;
|name=task_complete&lt;br /&gt;
|desc=Fired when [[commands.getBlockInfo]]() completes. This is used internally by the function itself and it is not needed to be used by the user.&lt;br /&gt;
|return1={{type|number}} taskID - the ID number of the task&lt;br /&gt;
|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;br /&gt;
|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed. Otherwise returned object 4 takes it's place, fallowed by returned object 5, 6, etc..&lt;br /&gt;
|return4={{type|table}} blockInfo - a table containing information on the block at the specified world co-ordinate&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==[[commandBlock.getCommand]]()==&lt;br /&gt;
{{Event&lt;br /&gt;
|name=task_complete&lt;br /&gt;
|desc=Fired when [[commandBlock.getCommand]]() completes. This is used internally by the function itself and it is not needed to be used by the user.&lt;br /&gt;
|return1={{type|number}} taskID - the ID number of the task&lt;br /&gt;
|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;br /&gt;
|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed. Otherwise returned object 4 takes it's place, fallowed by returned object 5, 6, etc..&lt;br /&gt;
|return4={{type|string}} command - the command in the command block&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==[[commandBlock.setCommand]]()==&lt;br /&gt;
{{Event&lt;br /&gt;
|name=task_complete&lt;br /&gt;
|desc=Fired when [[commandBlock.setCommand]]() completes. This is used internally by the function itself and it is not needed to be used by the user.&lt;br /&gt;
|return1={{type|number}} taskID - the ID number of the task&lt;br /&gt;
|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;br /&gt;
|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed. Otherwise returned object 4 takes it's place, fallowed by returned object 5, 6, etc..&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==[[commandBlock.runCommand]]()==&lt;br /&gt;
{{Event&lt;br /&gt;
|name=task_complete&lt;br /&gt;
|desc=Fired when [[commandBlock.runCommand]]() completes. This is used internally by the function itself and it is not needed to be used by the user.&lt;br /&gt;
|return1={{type|number}} taskID - the ID number of the task&lt;br /&gt;
|return2={{type|boolean}} success - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the task completed without error, &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; otherwise&lt;br /&gt;
|return3=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;success&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the task failed. Otherwise returned object 4 takes it's place, fallowed by returned object 5, 6, etc..&lt;br /&gt;
|return4={{type|boolean}} commandResult - &amp;lt;var&amp;gt;true&amp;lt;/var&amp;gt; if the command was executed successfully and returned positive value (a /testfor found a player), &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; if the command was not executed (invalid command or wrong arguments passed to the command) or it returned negative value (a /testfor didn't find a player)&lt;br /&gt;
|return5=[&amp;lt;nowiki/&amp;gt;{{type|string}} error] - if &amp;lt;var&amp;gt;commandResult&amp;lt;/var&amp;gt; is &amp;lt;var&amp;gt;false&amp;lt;/var&amp;gt; then this is the error message saying why the command failed&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>MKlegoman357</name></author>	</entry>

	</feed>