Why my python tkinter Button is not accessed

Question:

I am trying to do my computer science project with tkinter, it is a dice game, I have 3 UI window, the button on second one, when you click it, it will help you run function:"conti" but my VisualStudio said my button is not accessed.
This is my code

def GameWind():
    GW = tkinter.Tk()
    GW.geometry("1000x1000")
    GW.resizable(0,0)
    GW.title("In Game")
    GW.mainloop()
#Introduce window
def Introduce():
    Intro = tkinter.Tk()
    Intro.geometry("700x300")
    Intro.resizable(0,0)
    Intro.title("Introduce")
    ttk.Label(Intro,text ="...").pack()
    photo = tk.PhotoImage(file = "Sources ImagesRULES.gif",master=Intro)
    ttk.Label(Intro,image = photo).pack() 
    def conti():
            GameWind
            Intro.quit
    GameB=tk.Button(Intro,text="Continue",command=conti,master=Intro).pack()
    Intro.mainloop()    

But when I run it:

enter image description here

I try to search online for multiple hours, I found nothing.

Asked By: Surround1ng

||

Answers:

As matswecja already mentioned in her comment you are not using GameB variable. Also .pack() method returns None. To Resolve the issue just remove the GameB=

Answered By: Jonas Gredig
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.