Directdialog question

if the game im designing wasnt for school, id have quit WAAAAAAY long ago. ran into another problem:

the code here creates a dialog asking whether or not to exit the game, but when i click the button that should mean yes, nothing happens… other button works fine though.

def Exit(self):
	self.exitDialog = DirectDialog(dialogName="exitDialog", text="Are you sure?", 
				buttonTextList=["I'll slay some zombies!!","Yeah"], 
				buttonValueList=['a', 'b'], fadeScreen = True, command=self.Conf)

def Conf(self, choice):

It should be sys.exit(), not sys.exit. You forgot the call operator, ().

1 Like


such a stupid mistake! :blush:

thanks for pointing it out. used sys.exit() on multiple other places in my code, and forgot the () here.

1 Like