<?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[Transfer energy from spawn to controller]]></title><description><![CDATA[<pre><code>let code = creep.transfer(spawnFromThatRoom, RESOURCE_ENERGY, 15)
this.logger.log('transfer code', code)
</code></pre>
<p>I use this code and transfer returns -6 = not enough energy. But spawn has 300/300 energy. Creep is also at the adjusted square near spawn. What does -6 in this case mean? I can't get energy from spawn?</p>
]]></description><link>http://screeps.com/forum/topic/3082/transfer-energy-from-spawn-to-controller</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 23:36:40 GMT</lastBuildDate><atom:link href="http://screeps.com/forum/topic/3082.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 11 Oct 2020 13:24:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Transfer energy from spawn to controller on Invalid Date]]></title><description><![CDATA[<pre><code>let code = creep.transfer(spawnFromThatRoom, RESOURCE_ENERGY, 15)
this.logger.log('transfer code', code)
</code></pre>
<p>I use this code and transfer returns -6 = not enough energy. But spawn has 300/300 energy. Creep is also at the adjusted square near spawn. What does -6 in this case mean? I can't get energy from spawn?</p>
]]></description><link>http://screeps.com/forum/post/15654</link><guid isPermaLink="true">http://screeps.com/forum/post/15654</guid><dc:creator><![CDATA[DmitryDev]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Transfer energy from spawn to controller on Invalid Date]]></title><description><![CDATA[<p>Transfer is the wrong direction, you are looking for creep.<a href="https://docs.screeps.com/api/#Creep.withdraw" rel="nofollow">withdraw</a> in this case. Although withdrawing energy from the spawn is generally not a recommended strategy.</p>
<p><code>Transfer resource from the creep to another object. The target has to be at adjacent square to the creep.</code></p>
<p><code>Withdraw resources from a structure or tombstone. The target has to be at adjacent square to the creep</code></p>
]]></description><link>http://screeps.com/forum/post/15655</link><guid isPermaLink="true">http://screeps.com/forum/post/15655</guid><dc:creator><![CDATA[Geir1983]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Transfer energy from spawn to controller on Tue, 10 Nov 2020 20:11:12 GMT]]></title><description><![CDATA[<blockquote>
<pre><code>let creep = _.filter(Game.creeps, function(c){ return c.getActiveBodyparts(WORK) &gt; 0 &amp;&amp; c.getActiveBodyparts(CARRY) &gt; 0; })[0];
let spawn = creep.room.find(FIND_MY_SPAWNS)[0];
if(creep.pos.getRangeTo(spawn) == 1 &amp;&amp; creep.withdraw(spawn, RESOURCE_ENERGY) == OK) creep.upgradeController(creep.room.controller); else creep.moveTo(spawn);
</code></pre>
</blockquote>
<p>I think.</p>
]]></description><link>http://screeps.com/forum/post/15734</link><guid isPermaLink="true">http://screeps.com/forum/post/15734</guid><dc:creator><![CDATA[Detox]]></dc:creator><pubDate>Tue, 10 Nov 2020 20:11:12 GMT</pubDate></item></channel></rss>