Expand|Select|Wrap|Line Numbers
- def load(): # function to load game data
- if os.path.exists('./data.dat') == True:
- load = open('data.dat', 'r')
- save = load.readline()
- if save == "":
- welcome()
- elif save == "1\n" or "1":
- chce = raw_input("A saved game has been detected. Would you like to load this? Y/N ")
- if chce == "Y" or "y":
- pass # Not came that far yet
- elif chce == "N" or "n":
- welcome()
- else:
- print "Invalid choice please choose Y for yes or N for no."
- else:
- print "Fatal Error: 'data.dat' not detected."
Am I missing something obvious? Perhaps a syntax issue - like a block of code not in the right place. I am not that new to Python and have made a text-based RPG before in this language. However its been a while since I started using it again so maybe I am having a noob moment. Any help would be greatly appreciated, thanks,