Python Syntax (Welcome)
So I am trying to make a codebit in python but that's impossible and codecademy.labs doesn't work anymore so I'm using the first lesson as a place to put my codebit. Anyways, it's a little interactive game I'm making so I really want to know what I'm doing wrong (It says I have a syntax error on line 96)
I thought I could stack if -> else statements like this but I am thoroughly confused. If there is anything you can do to help, please let me know.
"""Variables: hello(says hello), Name(player's name), vil(name of player's village), weapon(weapon of player) evil(name of villain), path(main traits of player) direction(they should go to the right) spec(special ability) first(first fight action) motion(way you fight) coolness(what a special does) first_plot(first plotline and name of one dude) why_he_dead(decide to find dead guy's orgin of death or not) second(second fight action) third""" hello = "Hello, " name = raw_input ("what is your name?") if name > 0 and name.isalpha(): print hello + name else: print "You did not put your name in. You do not desereve to play this game" vil = raw_input ("You come from a tiny village. What is the name of the place you once lived?") if vil > 0 and vil.isalpha(): print "yes, you once lived in the village of " + vil else: print "I never heard of that village." weapon = raw_input ("You used a weapon to vanquish your foes. Did you use a mace, a sword, or a bow?") if weapon > 0 and weapon.isalpha(): print "yes. you used a " + weapon + " to fight your enemies." else: print "that is not a weapon." if len(weapon) == 4: motion = "Swing" else: print " " if len(weapon) == 5: motion = "Swing" else: print " " if len(weapon) == 3: motion = "Shoot" else: print " " evil = raw_input ("A horrible sorceror lives in the land. He is very mean. What is his name again?") if evil > 0 and evil.isalpha(): print "Your new quest is to defeat " + evil path = raw_input ("Mercenaries like you all have a certain path they follow to become better at combat. The paths are Fighter, Theif, and Mage. What path have you followed?") if path > 0 and path.isalpha(): print "Yes, that's right. You are a " + path else: print "That is not a path." if len(path) == 4: spec = "Fireball" coolness = "Incinerates" else: print " " if len(path) == 5: spec = "Backstab" coolness = "Cut the throat of" else: print " " if len(path) == 7: spec = "Power attack" coolness = "Decapitates" else: print " " direction = raw_input (" Your special ability is " + spec + ". You begin your journey leaving " + vil + " and you encounter a fork in the road. You have a map saying you should go to the right. Which direction do you go?") if len(direction) == 5: print "you go to the right." else: print "you die." first = raw_input ("You travel down a the path alone. A hooded figure appears right next to you out of thin air. He attacks you before you can identify him. Do you attack with your " + weapon + " -type \'fight\'- or do you use your " + spec + "? - type \'special\'-") if len(first) == 5: print "You " + motion + " with your " + weapon + ". The hit connects and the man falls down. You are able to see his face for the first time." elif len(first) == 7: print "Your " + spec + " " + coolness + " the hooded figure. You can barely see the remains of his face." else: print "The man kills you as you take too long to decide what to do." first_plot = raw_input ("You push back the hood of your fallen foe. You are able to recognize him as your old neighbor. What was his name again?") why_he_dead = raw_input ("You examine the fallen " + first_plot + " and realize there is a crystal in his pocket. You recognize it as a teleport crystal. This means you would be able to go to the place he teleported from, and see what corrupted him to make him want to fight you. - type YES - You could also leave it alone. - type NO -") if len(why_he_dead) == 3: stairs = raw_input ("You grab the crystal. You feel a sense of cold, and you find yourself in a completely different area. Your new location is cold, dark, and spooky. You knew " + first_plot + ", and he would never spend his time here if it were his choice. You hear movement in the room above, and you see stairs seperating you from what seems to be " + first_plot + "'s captors. Do you climb the stairs? - YES or NO -") if len(stairs) == 3: print "You climb the stairs." second = raw_input ("You see two people. One is duct-taped to a table, and the other appears to be doing a ritual on him. Do you attack the ritual-dooer - type \'attack,\' - or do you try to talk to him? - type \'talk\' -") if len(second) == 5: third = raw_input ("Do you attack with your " + spec + " - type \'special\ - ' or your " + weapon + "? - type \'weapon\' - " if len(third) == 7: if len(spec) > 7: print "Your " + spec + " is effective, because the ritual-dooer does not see you. You " + coolness + " the man." else: print "As you charge the figure, he turns and sees you. He freezes you mid-stride and you fall to the ground. A quick blow to the head knocks you out. You ever wake up." else: if len(weapon) == 3: print "You shoot the man with your bow, quickly ending his life." else: print "The man sees you, but a little too late. He is unable to draw his dagger before you swing your " weapon " down on him. His blood stains the adjacent wall red." else: print "You eventually die of hunger and impatience." """ ADD THE ELSE STATEMENT FROM LINE TO THIS LINE!!!"""