#๐Ÿ”’ My game crashes when I click on the actual game on the menu

33 messages ยท Page 1 of 1 (latest)

formal dragon
#

I'm making a space invaders type project for school, and when I'm using my teachers menu example, it crashes whenever I click the game menu, how do I fix this

stoic graniteBOT
#

@formal dragon

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

formal dragon
#

this is my code

dense badger
#

what's the error?

#

I can't run your code because you didn't provide all the files

formal dragon
#

is there a way too or no

dense badger
#

can you just tell me the error

#

like what's the traceback

formal dragon
#

it definitely is not a computer issue

dense badger
#

how are you running the code

formal dragon
dense badger
#

and what happens when you click on the menu

#

more specifically than "crashes"

formal dragon
# dense badger more specifically than "crashes"

so theres 4 buttons when i start up the program
game
instructions
credits
story

instructions credits story are all just a simple png inside of them, that has text corresponding to what it says, i can click x to exit out go back to the main menu
when i click on game specifically, it doesn't allow me to do anything else, i also have a highlight on anything i select and when i select it it stays on green

dense badger
#

so it freezes?

#

and the code does not exit?

formal dragon
dense badger
#

okay just fyi when you say 'crash' in programming people expect that the program has stopped altogether so that's pretty different from what has happened

formal dragon
#

o okay

dense badger
#

because your code is still running but it's just not updating the display

#

the problem is that you're not calling display.flip()

formal dragon
dense badger
#

like here for example

formal dragon
#

tysm

#

i put it after the if statements no wonder

dense badger
#

np

stoic graniteBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.