<?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[Random &#96;.startsWith is not a function&#96; bug]]></title><description><![CDATA[<p>Randomly will begin to receive the following error stack, after a while it sometimes just stops.</p>
<p> </p>
<pre>TypeError: role.startsWith is not a function<br> at Object.run (SpawnManager:75:22)<br> at Object.wrap (screeps-profiler:272:12)<br> at Object.module.exports.loop (main:18:12)<br> at __mainLoop:1:52<br> at ContextifyScript.Script.runInContext (vm.js:35:29)</pre>]]></description><link>http://screeps.com/forum/topic/521/random-startswith-is-not-a-function-bug</link><generator>RSS for Node</generator><lastBuildDate>Sat, 06 Jun 2026 10:24:02 GMT</lastBuildDate><atom:link href="http://screeps.com/forum/topic/521.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 27 Oct 2016 21:20:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Random &#96;.startsWith is not a function&#96; bug on Invalid Date]]></title><description><![CDATA[<p>Randomly will begin to receive the following error stack, after a while it sometimes just stops.</p>
<p> </p>
<pre>TypeError: role.startsWith is not a function<br> at Object.run (SpawnManager:75:22)<br> at Object.wrap (screeps-profiler:272:12)<br> at Object.module.exports.loop (main:18:12)<br> at __mainLoop:1:52<br> at ContextifyScript.Script.runInContext (vm.js:35:29)</pre>]]></description><link>http://screeps.com/forum/post/2558</link><guid isPermaLink="true">http://screeps.com/forum/post/2558</guid><dc:creator><![CDATA[NihilRex]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Random &#96;.startsWith is not a function&#96; bug on Invalid Date]]></title><description><![CDATA[<p>When it's happening, right before that error do a `console.log(JSON.stringify(role))` and see what's in role.</p>]]></description><link>http://screeps.com/forum/post/2559</link><guid isPermaLink="true">http://screeps.com/forum/post/2559</guid><dc:creator><![CDATA[sparr]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Random &#96;.startsWith is not a function&#96; bug on Invalid Date]]></title><description><![CDATA[<p>sparr: role is creep.memory.role, inside a loop of Game.creeps.</p>
<p>All of my creeps have a role, and it makes no sense for the error to be intermittent.</p>]]></description><link>http://screeps.com/forum/post/2560</link><guid isPermaLink="true">http://screeps.com/forum/post/2560</guid><dc:creator><![CDATA[NihilRex]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Random &#96;.startsWith is not a function&#96; bug on Invalid Date]]></title><description><![CDATA[<p>That's what it's supposed to be. Log it to find out what it actually is.</p>]]></description><link>http://screeps.com/forum/post/2561</link><guid isPermaLink="true">http://screeps.com/forum/post/2561</guid><dc:creator><![CDATA[sparr]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Random &#96;.startsWith is not a function&#96; bug on Invalid Date]]></title><description><![CDATA[<p>I failed to elucidate properly.</p>
<p> </p>
<p>This code has run for weeks properly on the live world.</p>
<p> </p>
<p>There is no rhyme or reason for it to intermittently fail on a private server, unless something wonky is going on in the server.</p>]]></description><link>http://screeps.com/forum/post/2562</link><guid isPermaLink="true">http://screeps.com/forum/post/2562</guid><dc:creator><![CDATA[NihilRex]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to Random &#96;.startsWith is not a function&#96; bug on Invalid Date]]></title><description><![CDATA[<p>Yes, and the first step to diagnosing what is going wrong in the private server is to see what role contains when the error happens. I didn't say it was a problem with your code, just that modifying your code is the quickest way to get insight into the problem.</p>]]></description><link>http://screeps.com/forum/post/2563</link><guid isPermaLink="true">http://screeps.com/forum/post/2563</guid><dc:creator><![CDATA[sparr]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>