Im attempting to make a simple cookie clicker like console based game, I am currently stuck at making the auto clicker in this game, I have looked into different functions to make this happen, but none have worked. This is because the function I am trying to repeat every second returns an int value, which gives me a, "int" value is not callable, error.
import threading
def setInterval(func,time):
e = threading.Event()
while not e.wait(time):
func()
def auto_click(money):
money = money + 1
return money
def main():
money = 0
run = True
while run:
print(money)
money = setInterval(auto_click(money), 1.0)
main()
This is what I have come up with so far, and it gives me the error mentioned above. Any help would be appreciated.