Oh. yeah. right. x)
Thanks a lot ^^'
Benoxiid
@Benoxiid
2
Posts
500
Profile views
0
Followers
0
Following
Posts made by Benoxiid
-
Screeps Crashing ?
//main.js:
var queue = require('spawn.queue');
module.exports.loop = function ()
{
queue.addCreep('Hello World !', 2);
console.log(queue.checkCreep);
};
//queue.js:
var spawnQueue = [];
module.exports =
{
addCreep: function(creep, number)
{
for (;number > 0; number++)
{
spawnQueue.push(creep);
}
},
spawnCreep: function(creep, number)
{
for (;number > 0; number++)
{
spawnQueue.unshift(creep);
}
},
checkCreep: function()
{
return (spawnQueue[0]);
},
getCreep: function()
{
return (spawnQueue.shift());
}
};
So. In simulation, this is making the game crash. idk where to start. x)
Can someone pls help me ? ^^