Closed beaesguerra closed 8 years ago
Yea, I saw that. Not sure how to fix it, it's a fairly non issue thing right now though.
This is a result of not properly closing pygame.
Example: In SDL2, I have to call:
void close()
{
SDL_DestroyRenderer(renderer);
SDL_DestroyWindow(window);
window = NULL;
renderer = NULL;
SDL_Quit();
exit(0);
}
Try to call https://www.pygame.org/docs/ref/pygame.html#pygame.quit before exit?
No, the problem is in the dict I use for moving between game states. Game states are a function that takes 2 arguments. sys.exit()
takes either 0 or 1 argument.
ohh i see
Not sure if you guys want to do something about that
Nah, I think if you don't think its worth the effort its okay
I fixed the previous issues.
Game closes properly, but I get this error:
Traceback (most recent call last): File "main.py", line 33, in
gamestate = run_game_state.get(gamestate, sys.exit)(screen, DRAWING_SCALE)
TypeError: exit expected at most 1 arguments, got 2