so I'm writing a little text adventure and have lots of nested if statements. However, there comes times where I want to terminate the program in one of these if statements to give a "GAME OVER". I've tried quit() and exit(), but at best they still output an error message:
Traceback (most recent call last):
File "<string>", line 9, in 0
SystemExit: 0
I'm not using any try/except statements, just if statements. For example:
import sys
if True:
print "Hello guv'na"
if True:
print "Good day, Good day"
sys.exit(0)
if True:
print "What's all this then?"
yields:
Hello guv'na
Good day, Good day
Traceback (most recent call last):
File "/Users/austin/test.py", line 6, in 0
builtins.SystemExit: 0
I just want the program to terminate after "Good day, good day" without a message. is this possible?