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?
code

this.commadToops = function(){
};

this.summonTroops = function() {
};

this.collectCoins = function() {
};

loop{
    this.collectCoins();    
    this.summonTroops();
    this.commandTroops();
}





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(){
[...]
this.commandTroops();

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 >= this.gold)

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