Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Function def error?


So I am trying to define a function and it’s tell me that it is not a function why is it doing this?

this.commadToops = function(){

this.summonTroops = function() {

this.collectCoins = function() {



I would guess you mean that the function CALL (where you try to use it) is telling you it is not a function, please be more specific in the future. :smile:

this.commadToops = function(){

you named the function: commadToops (no ‘n’ or ‘r’)
you call a function named: commandTroops (with ‘n’ and ‘r’)

    cost = this.costOf(type);
    if(cost >=


if cost is greater than gold…
…bug the poor sales clerk?, until he gets his manager to call the cops…
…go window shopping?, since you can’t afford it…


ah thanks @Vlevo

Window shopping?


Guys, phft :wink: . . . Imagine walking down the street (mall concourse) and looking at the displays in the shop windows…

“Window shopping” is where you go drool over all the stuff. (All drooling, no buying.)


Ah thank you for explaing