#๐Ÿ”’ Program breaks with no errors visible

20 messages ยท Page 1 of 1 (latest)

low bridge
drifting acornBOT
#

@low bridge

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.

white light
#

i think there is a problem with the mainloop

#

try replacing that with : ```py
while running:

if menu:
    starter_menu.update(screen)

elif game:
    player.update(screen)
    tiles = map_builder.map_gen(map1, screen)
low bridge
#

ill try lemme check if it works

#

still black screen and program freezes

#

maybe python can't handle the amout of stuff going on?

old blade
#

you created an infinite loop without having a way to escape it

old blade
#

but there are other infinite loops

low bridge
#

wait which ones?

old blade
#
def menu_working(self, surface):
        global menu
        while menu == True:
            surface.blit(self.background, (0,0))
            exit_button.update(surface)
            start_button.update(surface)
            settings_button.update(surface)
low bridge
old blade
#

the reason why, just from a cusory glance, your player.update function isn't running either

low bridge
#

he didn't appear because I put player.update() before the map_gen()

drifting acornBOT
#
Python help channel closed for inactivity

This help channel has been closed. 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.