<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://agiwiki.sierrahelp.com//index.php?action=history&amp;feed=atom&amp;title=Set.scan.start</id>
	<title>Set.scan.start - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://agiwiki.sierrahelp.com//index.php?action=history&amp;feed=atom&amp;title=Set.scan.start"/>
	<link rel="alternate" type="text/html" href="http://agiwiki.sierrahelp.com//index.php?title=Set.scan.start&amp;action=history"/>
	<updated>2026-09-22T22:22:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>http://agiwiki.sierrahelp.com//index.php?title=Set.scan.start&amp;diff=13092&amp;oldid=prev</id>
		<title>Andrew Korson: Created page with &quot;The &#039;&#039;&#039;set.scan.start&#039;&#039;&#039; command sets the entry point for a logic script.  == Syntax ==  set.scan.start();  == Remarks ==  When the &#039;&#039;&#039;set.scan.start&#039;&#039;&#039; command is executed, A...&quot;</title>
		<link rel="alternate" type="text/html" href="http://agiwiki.sierrahelp.com//index.php?title=Set.scan.start&amp;diff=13092&amp;oldid=prev"/>
		<updated>2019-04-22T00:43:17Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;The &amp;#039;&amp;#039;&amp;#039;set.scan.start&amp;#039;&amp;#039;&amp;#039; command sets the entry point for a logic script.  == Syntax ==  set.scan.start();  == Remarks ==  When the &amp;#039;&amp;#039;&amp;#039;set.scan.start&amp;#039;&amp;#039;&amp;#039; command is executed, A...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The &amp;#039;&amp;#039;&amp;#039;set.scan.start&amp;#039;&amp;#039;&amp;#039; command sets the entry point for a logic script.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
set.scan.start();&lt;br /&gt;
&lt;br /&gt;
== Remarks ==&lt;br /&gt;
&lt;br /&gt;
When the &amp;#039;&amp;#039;&amp;#039;set.scan.start&amp;#039;&amp;#039;&amp;#039; command is executed, AGI stores the current script position of the running [[logic]] in a [[scan start table]], and subsequent calls to this logic will start at that stored position, instead of starting at the beginning.&lt;br /&gt;
&lt;br /&gt;
This could be useful if a logic has a large section at the beginning that only needs to be executed once. At the end of that section, the &amp;#039;&amp;#039;&amp;#039;set.scan.start&amp;#039;&amp;#039;&amp;#039; command can be used to make AGI skip over the initialization section on subsequent iterations.&lt;br /&gt;
&lt;br /&gt;
Use the &amp;#039;&amp;#039;&amp;#039;[[reset.scan.start]]&amp;#039;&amp;#039;&amp;#039; command to reset the entry point back to the beginning of the logic.&lt;br /&gt;
&lt;br /&gt;
In the following example, you will only see the first message one time. After that, the logic begins execution at the second print statement. If [[flag]] f99 is set to TRUE at some point, the scan point is reset back to the beginning, and the next iteration will show the first command again.&lt;br /&gt;
&lt;br /&gt;
== Possible Errors ==&lt;br /&gt;
&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;CodeBlockHeader&amp;quot;&amp;gt;Code:&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;agi&amp;quot;&amp;gt;&lt;br /&gt;
print(&amp;quot;this is first command.&amp;quot;);&lt;br /&gt;
set.scan.start();   [ subsequent calls to this logic will start at the &lt;br /&gt;
                    [ command following this call to set.scan.start&lt;br /&gt;
print(&amp;quot;this is second command.&amp;quot;);&lt;br /&gt;
if(isset(f99))&lt;br /&gt;
  {&lt;br /&gt;
  reset.scan.start();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Technical Information ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
| style=&amp;quot;background-color: #efefef&amp;quot; width=&amp;quot;200&amp;quot; | &amp;#039;&amp;#039;&amp;#039;Required Interpreter Version:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| width=&amp;quot;175&amp;quot; | Available in all AGI versions.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background-color: #efefef&amp;quot; | &amp;#039;&amp;#039;&amp;#039;Byte-Code Value:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| 145 (0x91 hex)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Flow Control Commands]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[[reset.scan.start]]&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Category:Commands]]&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Andrew Korson</name></author>
	</entry>
</feed>