On 06/12/12 23:43, Mark Rourke wrote:

def showMenu():
#THIS IS ALL PART OF SHOWMENU:
         #keep getting items for this order until the user wants to end the 
order
                      #set initial quantities of items
     numBurgers=20;
     numFries=20;
     numSodas=20;
     menuItem = showMenu()<---------ERROR THERE<----
                 #ordering stuff from the menu

def main():
     getOrderNumber()
     showMenu()
main()

main calls showMenu which calls showMenu which calls showMenu etc....

You need to break the cycle of showMenu calls. Thats usually done by inserting some kind of check before the call to showMenu inside showMenu so that you only call it when needed.

However I suspect what you really need here is to use a loop instead of having showMenu calling itself.

choice = None
while not choice     # or some other test condition here
   choice = showMenu()

HTH
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to