I'm new to python, and I was creating a small game when I got a problem. I searched for an answer, found one, yet it didn't work.
The game I'm trying to make is more or less a recreation of Cookie Clicker, and I'm trying to make the label which I have the score on update, instead, it creates a new label.
from tkinter import *
import time
master = Tk()
def uiPrint():
print("")
print(click)
blankLine()
click = 0
mult = 1
dcp1 = 0
def blankLine():
for i in range(20):
print("")
def buttonCommand():
global click
global mult
click += 1*(mult)
uiPrint()
scoreCommand = Button(text=click)
scoreCommand.pack()
mainClickButton = Button(master, text="Click me!", command = buttonCommand)
mainClickButton.pack()
master.title("Cookie Clicker")
photo = PhotoImage(file=r"C:\Users\---\Desktop\Cookie.gif")
label = Label(image=photo)
label.image = photo
label.pack()
mainloop()