Python error ValueError size needs to be int width int height while using pygame Surface

0 votes

I'm trying to make a game on python, and I'm stuck at this error.

enemy_11 = pygame.Surface(200, 300, largura_naves, altura_naves)
ValueError: size needs to be (int width, int height)

here are the lines that are causing the problem, at least I think

def main():
    enemy_11 = pygame.Surface(200, 300, largura_naves, altura_naves)
    enemy_00 =  pygame.Surface(600, 300, largura_naves, altura_naves)

    clock = pygame.time.Clock()
    run = True
    while run:
        clock.tick(fps)
        for event in pygame.event.get():
            if event.type == pygame.QUIT:

                run = False
        enemy_00.x += 1
        draw_window(enemy_11, enemy_00)

    pygame.quit()


if __name__ == "__main__":
    main()
Apr 19, 2021 in Python by anonymous

edited 4 days ago 8 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP