I got a error for refrencing the variable increment before I declared it. When I open the store and buy more money per click, I get a flood of errors. I require help please.
here's my code:
from time import sleep as wait
import os
coin = 0
autoclick = 0
incrementation = 25
uppergrades_bought = 1
increment = 1
clear = lambda: os.system('clear')
def store():
cmd = int(input("What do you want to do? 1 to buy autoclick and 2 to buy more money per click").strip())
if cmd == 1:
coin-incrementation*uppergrades_bought
autoclick+=1
elif cmd == 2:
coin-incrementation*uppergrades_bought
increment+=1
clear()
while 1 == 1:
print("You have {} coins!".format(coin))
coins = input("Press enter")
clear()
coin+=increment
if coin>=incrementation*uppergrades_bought:
storeyn = input("Hi, would you like to go into the store? you have enough to buy the next uppergrade")
if storeyn.strip().lower() == "yes" or storeyn.strip().lower() == "y":
store()
elif storeyn.strip().lower() == "no" or storeyn.strip().lower() == "n" :
pass
else:
pass
else:
pass