#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    2
    Rep Power
    0

    What is the error?


    Code:
    while True:
    		next = raw_input("> ")
    		
    		if next == "take honey":
    			dead("The bears looks at you and slaps your face off.")
    		elif next == "taunt bear" and not bear_moved:
    			print "The bear has moved from the door. You can go through it now."
    			bear_moved = True
    		elif next == "taunt bear" and bear_moved:
    			dead("The bear chews your leg off."
    		
    yellow Code:
    elif next == "open door" and bear_moved:
    gold_room() else: print "I got no idea what it means"

    What is the syntax error in the highlighted line???
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Location
    Iran
    Posts
    149
    Rep Power
    140
    In the precedent line you forgot to close parenthesis

    Code:
    elif next == "taunt bear" and bear_moved:
        dead("The bear chews your leg off."
    should be

    Code:
    elif next == "taunt bear" and bear_moved:
        dead("The bear chews your leg off.")
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    2
    Rep Power
    0

    Thanks


    This is an embarrassing mistake. Thanks man.

IMN logo majestic logo threadwatch logo seochat tools logo