My Repl won't run

Question: My repl won’t run. I have tried to stop and rerun it, but that does not do anything.

Repl link/Link to where the bug appears: https://replit.com/@CoderShayan/Escape-Room-In-progress

Screenshots, links, or other helpful context:

import os, time

def clear_screen():
  os.system('cls' if os.name == 'nt' else 'clear')
print("Welcome to the Escape Room!")
print("1. Play Escape Room")
print("2. Controls")
print("3. Settings")
mainmenu = input("Your selection: ")
while mainmenu != "1":
  if mainmenu == "2":
    print("Escape room is a text-based game where you try to escape the room.")
    print("You may choose from a selection of rooms to escape from.")
    print("You will be able to turn to different sides of the room.")
    print("You will be able to interact with objects in the room.")
    print("As you progress, you will gain things to put in your inventory.")
    print("You will need them to escape.")
    print("Have Fun!")
  elif mainmenu == "3":
    print("Settings: To come soon...")
  else:
    print("Invalid selection.")
##GAMECODE##
if mainmenu == "1":
  clear_screen()

  print("Choose your Room:")
  print("1. Office")
  print("2. Jail (Coming Soon)")
  mapchoice = input("Your selection: ")
  if mapchoice == "1":
    print("You have chosen the Office.")
    print("Please wait...")
    time.sleep(2)
    clear_screen()
    print("Welcome to the Office.")
    #all code here
  


  elif mapchoice == "2":
    print("You have chosen the Jail.")
    print("Please wait...")
    time.sleep(2)
    clear_screen()
    print("Welcome to the Jail. This is not currently developed, please choose the office map.")
    #all code here
  else:
    print("Please choose a valid option.")

Solved, I had to close the console tab, refresh the page, and open it again.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.