- 2
Help
Can you help me make this function work. Please text me if you have an idea what going wrong. var cows = 0; }); onEvent("cows", "click", function( ) { check(200, 2, "cows"); }); function check(cost, mult, x) { if (money >= cost) { x ++; money = money-cost; constante(mult, x); } }
1 ответ
+ 2
You posted half part code by that precitions of errors may not work..
But in your code, x is string and so x++ is not valid.. Where is money variable you initialized.. It may be mult not money.. Is it?