Code:
from sys import exit from random import randint def main_hall(): print "You are on the war ship. You need to get into the elevator to get to the bridge; where the General is." print "The whole destroyer is on alert and nearly every door is locked. There is a keypad on the elevator." print "There is a warning saying you only have 10 attemps, then the system deactivates and you cannot complete your mission. Be careful!" combination = "%d%d%d" % (randint(1,9), randint(1,9), randint(1,9)) guess = raw_input ("[Keypad:] ") guesses = 0 while guess != combination and guesses < 10: print "*BZZT!* ERROR 2355: Incorrect combination!" guesses += 1 guess = raw_input if guess == combination: print "You open the elevator and start going up, fast. When you get to the top, you are at a T-junction. Do you go left or right?" return 'junction' else: print "You have had more than 10 attempts! \n A small self destruct system in the lock blows you up!\n" return 'death' def death(): lols = ["NO! You have failed this mission!", "Game over kid!", "You are really bad.", "Mission over, you may aswell go home."] print lols(0, len(lols)-1) exit (1)
Why does nothing happen? There are no error messages, just nothing happens.... thanks!
Comment