0
def game():
print("This is a simple text game, set in a science laboratory in space, orbiting the black hole in the center of the galaxy of Andromeda. You are a lone scientist, with the rest of your crew lost in the travel to Andromeda. The trip first started with a hyper transport all the way to about 5 full solar systems away from the needed orbit area. You, the 23 year old with 3 physics doctorates, was the only one not awakened from suspended animation. The rest expired spending their life piloting the ship.  The date is november 3rd 2432.")
A = eval(input("You wake up one morning with an alarm blaring throughout the ship. Do you 1. go back to sleep or 2. get up to figure out what is : "))
    if A == 1:
            print("You fall back to sleep, having sealed your bed chamber and muffled the alarm to just a throbbing bass. But suddenly you awake to find that the alarm has stopped and the area outside your chamber is dark. Knowing what could have happened, you use your chambers mini SCU to check the ships pressure in your sector and the hull's integrity. You discover that the alarm was for a pressure spike in a certain area of the ships external layer (the space between the inside wall and ship outer wall).")
    elif A == 2:
            print("As you get up, you realise that the alarm was no wakeup alarm. As you rush over to the nearest SCU (Ship Control Unit), clearing away any morning dreariness, you find that an oxygen line in the outer hull of the ship has leaked exponentially, and has caused a pressure spike in that section of the outer ship. You gasp in horror as you realise tat the heavy oxidization could probably severely corrode the exposed copper wiring in that section, making any attempt to use anything with electrical properties that has a connection to the wires in that section extremely deadly. A spark would be caused by the malfunctioning lines and the high oxygen density would light up like a 19th century blast mine.")
    elif A == 13:
            print("You did not enter a correct choice. Therefore you have broken the game. You may be proud of yourself, but your mother isn't. Neither am I. Good luck restarting the game just to avoid making the wrong choice! By the way, that was sarcasm, if it flew over your head, however big it is from being so smug. I pity you and you're failed attempt at recieving love from your mother, as said earlier. Now, restart this game I worked hard on, and don't break it again. Also, different text won't pop up, even if you try to a wrong choice again. The meaning of insanity, of course, is doing things over and over expecting different results.")
    else: print(" ERROR 1304: Incorrect choice. Restart game to fix error. P.S. you missed an easter egg.")

thats the code, and line four keeps having an " inconsistent use of tabs and spaces in indentation" error and i have no idea why. I started learning python a month ago so please excuse any amateur mistakes.

jamylak
  • 128,818
  • 30
  • 231
  • 230
Fitz
  • 1
  • 2
  • In some places you use a tab (by hitting the TAB key). In other places, you indent your code by hitting the spacebar 4 times. Don't do that. Python doesn't like that. Use one or the other, but not both – inspectorG4dget Oct 17 '16 at 03:20
  • @inspectorG4dget Can you close as duplicate, I didn't realise it didnt have `python` tag when closed as duplicate – jamylak Oct 17 '16 at 03:21
  • what if its an automatic indent? – Fitz Oct 17 '16 at 03:21
  • Then check whether your IDE uses tabs or spaces, and follow that convention – inspectorG4dget Oct 17 '16 at 03:22
  • @inspectorG4dget THANK YOU that lil bit of code i posted, i redid all indents and the module checks perfectly! – Fitz Oct 17 '16 at 03:23
  • some editors, IDEs have (in some menu) functions "Convert spaces to tabs" and "Convert tabs to spaces" so it can help you when you get this error again. In some editors, IDEs in options you can even set "automatically convert tabs to spaces when you save file" – furas Oct 17 '16 at 03:28
  • @Fitz get a *Python* IDE or an editor with *Python* mode; those would usually automatically do the right thing. – Antti Haapala -- Слава Україні Oct 17 '16 at 04:10

0 Answers0