<?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[roleFixer not defined]]></title><description><![CDATA[<p>I'm trying to make a creep to go around repairing structures, and I'm having this issue:</p>
<p> </p>
<p>I create a module</p>
<p>role.fixer</p>
<p>which has this:</p>
<p>var roleFixer = {</p>
<p>/** @param {Creep} creep **/<br> run: function(creep) {</p>
<p>//code to fix things<br> }<br>};</p>
<p>module.exports = roleFixer;</p>
<p> </p>
<p>When I put the following in my main:</p>
<p> </p>
<p>if(creep.memory.role == 'fixer') {<br> roleFixer.run(creep);<br> }</p>
<p>I get this error:</p>
<p> </p>
<p>ReferenceError: roleFixer is not defined<br> at Object.module.exports.loop (main:59:13)<br> at __mainLoop:1:52</p>
<p> </p>
<p>What am I doing wrong? The role.fixer module looks the same as my other roles, so I can't figure out why it's not 'defined'.</p>]]></description><link>http://screeps.com/forum/topic/334/rolefixer-not-defined</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Jul 2026 08:04:33 GMT</lastBuildDate><atom:link href="http://screeps.com/forum/topic/334.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 10 Jan 2017 15:42:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to roleFixer not defined on Invalid Date]]></title><description><![CDATA[<p>I'm trying to make a creep to go around repairing structures, and I'm having this issue:</p>
<p> </p>
<p>I create a module</p>
<p>role.fixer</p>
<p>which has this:</p>
<p>var roleFixer = {</p>
<p>/** @param {Creep} creep **/<br> run: function(creep) {</p>
<p>//code to fix things<br> }<br>};</p>
<p>module.exports = roleFixer;</p>
<p> </p>
<p>When I put the following in my main:</p>
<p> </p>
<p>if(creep.memory.role == 'fixer') {<br> roleFixer.run(creep);<br> }</p>
<p>I get this error:</p>
<p> </p>
<p>ReferenceError: roleFixer is not defined<br> at Object.module.exports.loop (main:59:13)<br> at __mainLoop:1:52</p>
<p> </p>
<p>What am I doing wrong? The role.fixer module looks the same as my other roles, so I can't figure out why it's not 'defined'.</p>]]></description><link>http://screeps.com/forum/post/1654</link><guid isPermaLink="true">http://screeps.com/forum/post/1654</guid><dc:creator><![CDATA[brento73]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to roleFixer not defined on Invalid Date]]></title><description><![CDATA[<p>you seem to be missing your module importation in main.</p>
<p>var roleFixer = require('role.fixer');</p>]]></description><link>http://screeps.com/forum/post/1655</link><guid isPermaLink="true">http://screeps.com/forum/post/1655</guid><dc:creator><![CDATA[ben2]]></dc:creator><pubDate>Invalid Date</pubDate></item><item><title><![CDATA[Reply to roleFixer not defined on Invalid Date]]></title><description><![CDATA[<p>Thanks, yeah, I was missing that 'require' at the beginning of the main. </p>]]></description><link>http://screeps.com/forum/post/1656</link><guid isPermaLink="true">http://screeps.com/forum/post/1656</guid><dc:creator><![CDATA[brento73]]></dc:creator><pubDate>Invalid Date</pubDate></item></channel></rss>