Python Forum
[PyGame] Return won't stop a function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGame] Return won't stop a function
#4
(Apr-25-2021, 01:50 PM)jonagold Wrote: Thank you for the tips I will try to implement them and use them (When I understand them, because I'm a beginner Big Grin ). However return didn't work even when I didn't put break in my code. Return somehow just doesn't stop the menu function for some reason.
No problem, I actually had an error in there which I just fixed, but I can explain how it works. So there's a list langs which contains the info for each lang. The code indexes the list with the lang variable and uses the values listed in the tuples to know what to blit and draw. Also, one of the best ways to debug code is to put print statements. So try placing some print statements around your code to see what's happening.
Reply


Messages In This Thread
Return won't stop a function - by jonagold - Apr-23-2021, 04:57 PM
RE: Return won't stop a function - by SheeppOSU - Apr-24-2021, 06:53 PM
RE: Return won't stop a function - by jonagold - Apr-25-2021, 01:50 PM
RE: Return won't stop a function - by SheeppOSU - Apr-28-2021, 01:39 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020