I looked around in the forum and this seems to be a common problem. Not sure why to include a console at all if you can't it use to access your code.
jaf2k
@jaf2k
3
Posts
723
Profile views
0
Followers
0
Following
Posts made by jaf2k
-
RE: Where to put prototype extends?
-
RE: Where to put prototype extends?
Yeah I messed up the MD part and didn't find the edit button.
Interestingly it works when I put the call to the added prototype method in the script tab, but it doesn't work in the console.
-
Where to put prototype extends?
I tried to use the code example from the docs:
Spawn.prototype.createWorkerCreep = function(name) { return this.createCreep([WORK, CARRY, MOVE], name); };
When I try to execute:
Game.spawns.Spawn1.createWorkerCreep('Worker1');
I get an error saying the function is not defined.
I put this as the first thing in my main module in the script section. Is this correct? If someone could enlighten me what I am doing wrong here, that'd be great.
Thanks.