The Python invalid sync error appears.

Asked 2 years ago, Updated 2 years ago, 40 views

        draw_score()
        pygame.display.flip()



        else:
            draw_main_menu()

An error appears in else: part of this part.

error

2022-09-20 18:59

1 Answers

I think it's an indent error.

The following code is an error code.

        draw_score()
        pygame.display.flip()

        else: #else statement is indent
            draw_main_menu()

This is a normal code

        draw_score()
        pygame.display.flip()

    else: #else statement not indented
        draw_main_menu()

Check if the invalid syntax error contains words such as indent


2022-09-20 18:59

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.