<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[pos.findClosestByPath(flags) returns not a flag]]></title><description><![CDATA[<p>Just received notification from this code:</p>
<pre><code>    var flags:&lt;Flag[]&gt; = ...;
    var flag = &lt;Flag&gt;creep.pos.findClosestByPath(flags);
    if (flag &amp;&amp; !(flag instanceof Flag))
            Game.notify("among flags " + flags + " the closest is " + flag, 1);
    }
</code></pre>
<p>notification:</p>
<pre><code>among flags [flag mine-1] the closest is [source #55db326cefa8e3fe66e051a0]
</code></pre>
<p>Here flag mine-1 is positioned on the source #55db326cefa8e3fe66e051a0.</p>
<p>Usually this code works well and does  not send me notifications. But sometimes sends.</p>]]></description><link>http://screeps.com/forum/topic/1334/pos-findclosestbypath-flags-returns-not-a-flag</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 03:43:00 GMT</lastBuildDate><atom:link href="http://screeps.com/forum/topic/1334.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 04 Oct 2015 09:52:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to pos.findClosestByPath(flags) returns not a flag on Invalid Date]]></title><description><![CDATA[<p>Just received notification from this code:</p>
<pre><code>    var flags:&lt;Flag[]&gt; = ...;
    var flag = &lt;Flag&gt;creep.pos.findClosestByPath(flags);
    if (flag &amp;&amp; !(flag instanceof Flag))
            Game.notify("among flags " + flags + " the closest is " + flag, 1);
    }
</code></pre>
<p>notification:</p>
<pre><code>among flags [flag mine-1] the closest is [source #55db326cefa8e3fe66e051a0]
</code></pre>
<p>Here flag mine-1 is positioned on the source #55db326cefa8e3fe66e051a0.</p>
<p>Usually this code works well and does  not send me notifications. But sometimes sends.</p>]]></description><link>http://screeps.com/forum/post/6025</link><guid isPermaLink="true">http://screeps.com/forum/post/6025</guid><dc:creator><![CDATA[xoposhiy]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to pos.findClosestByPath(flags) returns not a flag on Invalid Date]]></title><description><![CDATA[<p>Still observe this error:<br>
findClosestByPath somethimes returns object with wrong type.</p>
<p><code>findClosestByPath(FIND_EXIT_RIGHT)</code>  may return extension or flag for example.</p>]]></description><link>http://screeps.com/forum/post/6026</link><guid isPermaLink="true">http://screeps.com/forum/post/6026</guid><dc:creator><![CDATA[xoposhiy]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to pos.findClosestByPath(flags) returns not a flag on Invalid Date]]></title><description><![CDATA[<p>reproduce in console:<br>
<code><br>
Game.rooms['W12S23'].getPositionAt(49, 42).findClosestByPath(3)<br>
[9:03:09] [room W12S23 pos 49,42]<br>
Game.rooms['W12S23'].getPositionAt(49, 42).findClosestByPath(3)<br>
[9:03:10] [structure (extension) #5612f7dcb3c550e1219a1da9]<br>
</code></p>]]></description><link>http://screeps.com/forum/post/6027</link><guid isPermaLink="true">http://screeps.com/forum/post/6027</guid><dc:creator><![CDATA[xoposhiy]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to pos.findClosestByPath(flags) returns not a flag on Invalid Date]]></title><description><![CDATA[<p>And doublet queries behave that way:</p>
<pre><code>Game.rooms['W12S23'].getPositionAt(49, 42).findClosestByPath(3)
Game.rooms['W12S23'].getPositionAt(49, 42).findClosestByPath(3)
[room W12S23 pos 49,42]
[room W12S23 pos 49,42]
Game.rooms['W12S23'].getPositionAt(49, 42).findClosestByPath(3)
Game.rooms['W12S23'].getPositionAt(49, 42).findClosestByPath(3)
[structure (extension) #5610f4e97232cb0022417b4c]
[structure (extension) #5610f4e97232cb0022417b4c]
Game.rooms['W12S23'].getPositionAt(49, 42).findClosestByPath(3)
Game.rooms['W12S23'].getPositionAt(49, 42).findClosestByPath(3)
[room W12S23 pos 49,42]
[room W12S23 pos 49,42]
</code></pre>]]></description><link>http://screeps.com/forum/post/6028</link><guid isPermaLink="true">http://screeps.com/forum/post/6028</guid><dc:creator><![CDATA[xoposhiy]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>