IDK what my problem is, i run it and i have come to this conclusion that if i get rid of the startClick function it runs if i put it back it breaks. plz help
Error:Traceback (most recent call last):
File "C:\Users\saba_\Desktop\python\clickerHero.py", line 44, in <module>
start = Button(root, text="start", width=25, bg="lightgreen", command=startClick)
TypeError: __call__() got an unexpected keyword argument 'text'
>>> from tkinter import *
import time
from pynput.mouse import Button, Controller
#creates the window
root = Tk()
root.geometry("600x400")
root.title("attempt1")
#global var
#def
def startClick():
startClickingVar = 0
if startClickingVar == 0:
startClickingVar = 1
while startClickingVar == 1:
mouse.click(Button.right, 1)
else:
pass
def stopClick():
if startClickingVar == 1:
startClickingVar = 0
else:
pass
def exit():
exit()
#var
#lables
welcomingLable = Label(root, text="Hi, Welocme to Hero Clicker AutoClicker", font=("arial", 20, "bold"), fg = "blue")
welcomingLable.pack(side=TOP)
#buttons
start = Button(root, text="start", width=25, bg="lightgreen", command=startClick)
start.place(x=50, y=140)
stop = Button(root,text="stop", width = 25, bg="red", command=stopClick)
stop.place(x=300, y=140)
exitButton = Button(root, text="Exit", width = 25, bg="red", command=exit)
exitButton.place(x=175, y=180)
#enterys
numberOfClicks = 1
enterCardInfo = Entry(root, textvariable= numberOfClicks, width=50, bg="orange",)
enterCardInfo.place(x=150, y=100)
# has to stay below so everthing runs within
root.mainloop()
