Why won't my code run?
MarleyMoyo (0)

import time

print("Welcome to Marley's Escape Game")
health = 100
print("Your health is ", health)

cloth = False
gasoline = False
stick = False

def room_2():
print("You leave the room you're in and enter room 2, in which there is a table with a flask of strong smelling liquid and a lighter next to it. If alcohol this could warm you or you could pour it on the stick, light it and make a torch.")

choice = input("What do you wish to do? n\ 1) Drink the liquid\n 2) Make a fire\n 3) Pick up lighter and the liquid, then leave\n Choice:")
if choice == "1":
print("You drink the liquid and it warms you up, health + 10 ")
print("Your health is", health + 10)
elif choice == "2":
print("You successfully light a fire but burn your hands badly and you need to run them under cold water, health - 10")
print("Your health is", health - 10)
elif choice =="3":
print("You have chosen to take the liquid and lighter and keep moving")
print("You must choose either 1, 2, or 3")

def intro(health,cloth,gasoline,stick) :
print("You wake up from a deep sleep and find yourself in a dark room in what seems to be an abandoned factory of sorts. All you can see is a piece of cloth on the floor, a large stick, some gasoline and a pile of rocks. There is a faint dripping sound off in the distance and it is very cold. You need to escape but you cannot see, what are you going to do?")

choice = input("What do you wish to do? \n 1)Pick up the cloth\n 2)Grab the gasoline\n 3)Pick up the stick\n Choice:")
if choice == "1":
print("You grab the cloth but a rat runs out and attacks you, health - 5")
cloth = True
print ("Your health is", health -5)
if stick == True and gasoline == True and cloth == True:
print("You have all objects")
print("You need more! Go back and collect them")
elif choice == "2":
print('You pick up the gasoline but spill it over yourself, health - 10')

You are viewing a single comment. View All
Zavexeon (912)

Are you getting any errors? It might help me figure out what's going on.