Ошибка SyntaxError: 'return' outside function
while True:
for event in pygame.event.get():
if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):
pygame.quit()
sys.exit()
elif event.type == KEYDOWN and (event.key == K_SPACE or event.key == K_UP):
return
else:
display_screen_window.blit(game_image['background'], (0, 0))
display_screen_window.blit(game_image['player'], (p_x, p_y))
display_screen_window.blit(game_image['message'], (msgx, msgy))
display_screen_window.blit(game_image['base'], (b_x, play_ground))