mercredi 8 janvier 2020

When my variable is more than 2 or equals 2, my statement else does not work?

        talked_1 = 0
        time.sleep(1)
        talk = int(input("Ты можешь поговорить с гоблином, или сделать ему комплимент. 1, 2"))
        if talk == 1:
            talked_1 = talked_1 + 1
            if talked_1 == 1:
                time.sleep(1)
                print("Вы сказали гоблину что нет нужды драться и это не помогло.")
            else:
                time.sleep(1)
                print("Вы уже не знаете что сказать.")

so, player types 1 and then variable "talked_1" gets + 1 and if that variable == 1 then it should print, but statement else (almost the same if i would do "if talked_1 >= 2:") doesnt work for some reason.

Aucun commentaire:

Enregistrer un commentaire