0

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.

zmoney
  • 11
  • There are many problems with your code. Can you post full code so that I can see what would be the best thing to do in your case? – mbostic Apr 06 '22 at 20:49
  • Does this answer your question? [TypeError: 'int' object is not callable](https://stackoverflow.com/questions/9767391/typeerror-int-object-is-not-callable) – qorka Apr 06 '22 at 20:51

0 Answers0