Here is the code so far (things dealing with menus being activated are highlighted)

SectionSel=True
while SectionSel:
print ("""\n---------
1.Fight
2.Shop
3.Explore
4.Quit
---------"""

SectionSel=input("What would you like to do?: ")
if SectionSel == "1":
SectionSel=False
Fight=True
hp = 100
ehp = 20
hpchance = 3
elif SectionSel == "2":
print("e")
elif SectionSel == "3":
print("e")
elif SectionSel == "4":
print("e")
elif SectionSel == "":
print("\n Not Valid Choice Try again")
while Fight:
print('\nEnemy HP', ehp)
print("""--------
1.Attack
2.Heal
--------""")
if Fight == "1":
dmg = random.randint(1, 20)
ehp = ehp - dmg
dmg = random.randint(1, 20)
hp = hp - dmg
if hp < 1:
print("\nYou Died")
break
elif ehp < 1:
print("\nVictory!")
SectionSel=True
Fight=False
elif Fight == "2":
if hpchance < 1:
print("\nCannot Heal!\n")
elif hpchance > 0:
hpchance = hpchance - 1
hp = hp + random.randint(1, 25)
hp = hp - random.randint(1, 10)
if hp < 1:
print("\nYou Died")
break
elif ehp < 1:
print("\nVictory!")

elif Fight == "":
print("\n Not Valid Choice Try again")
SectionSel=True
Fight=False

Basically, the goal is to go back to SectionSel once the fight finishes. However, the program just breaks. How do I get this back working? It worked at one point I believe, but now I don't know what's been done wrong.

+1 vote
answered Nov 9 by (63,320 points)

There was a missing closing parenthesis at the end of your first print() and a missing indentation from your first input().

After this, your code ran, and seemed to work OK to me. Here's the input/output:

```---------
1.Fight
2.Shop
3.Explore
4.Quit
---------
What would you like to do?: 1

Enemy HP 20
--------
1.Attack
2.Heal
--------