#๐ Program breaks with no errors visible
20 messages ยท Page 1 of 1 (latest)
Click here to see this code in our pastebin.
@low bridge
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.
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)
ill try lemme check if it works
still black screen and program freezes
maybe python can't handle the amout of stuff going on?
you created an infinite loop without having a way to escape it
like what he said
but there are other infinite loops
wait which ones?
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)
I fixed it ty for pointing it out now I just need to make the play appear cause for some reason he is not on the screen
the reason why, just from a cusory glance, your player.update function isn't running either
but yeah, no problem
ty again
he didn't appear because I put player.update() before the map_gen()
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.