I have set a variable for coins (var coins = 0;) at the top of my code. But when I have over or equal to 1000 it doesn’t change the number of coins or hide “Guns2”
Please confirm that this is not for the create PT. As a reminder, we cannot help with the Create PT. If it is not, please share the link to the code.
This is not Create PT, I figured out this issue but i have a new one, if the price of an upgrade is over the coin amount, it will still upgrade. I want it so if the coin amount is lower than the upgrade price, it won’t change the amount with either the coin amount and the upgrade price. (Code.org)
On lines 15 and 16 in your screenshot, shouldn’t you be comparing the coins to gunprice rather than 1000. Also, shouldn’t you be subtracting the gunprice from coins instead of a fixed amount of 1000.