Can Anyone Figure Out What's Wrong With This?

Its pygame, when ran the game loads but the screen is just blank.

I had a quick look and there are quite while True loops with exit (meaning quit) statements.

You should look at those and use print statements to make sure your program actually executes instead of getting stuck in one of those (as I expect).

Please try.

If you really do not manage I guess we can give more tips or eventually somebody will solve it (but hopefully not as it is the worse way to learn to be handed a solution immediately :slight_smile: )


You have multiple infinite loops, obviously only the first one will run. Please update your code so there’s only one infinite loop (personal suggestion, instead of running your files by doing import namefile, create functions in your files and import them in order to use all of them together, like this: from namefile import fun1, fun2, fun3, class1, class2

1 Like

Yes importing scripts that have running code in them in the global scope is bad practice, but not the problem

1 Like

Solved the issue thanks for the help! :grinning:

1 Like

Can you tell us how, so that others who encounter this problem can use your answer?

Theres a weird thing with Replit. Basicly I had imported the “pygame” library, for some reason this causes launching issues I had to instead create a new project and instead of selecting “Python” I had to select “Pygame” when selecting the programing language when creating the Repl. I don’t know why its a thing though. Think it may be a bug.¯_(ツ)_/¯


Please mark that post as the solution.





I know my spelling is horrible* lol don’t need to point it out. *I think even horrible might be spelt wrong.

1 Like

I always hate when people fix my spelling especially (but I know some people cannot stop themselves, like my wife and teachers), because I hate how my finger cross …


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.