A
A
AAA9992222021-03-04 19:43:23
Python
AAA999222, 2021-03-04 19:43:23

Module 'pygame.display' has no attribute 'set_mod'. How to fix?

I studied the pygame library one by one, and named the file itself pygame. Nothing worked for me, and I googled the problem, where they wrote that it was impossible to call it that. I renamed, nothing changed. Deleted the file and created a new one, nothing. I even copied everything to another disk, it did not help. Rummaged through all the disks, there is no file with the name pygame.
Code itself:
import pygame
pygame.init()

win = pygame.display.set_mod(500, 500)
pygame.display.set_caption('Cuber World')

x = 50
y = 50
width = 40
height = 60
speed = 5

run = True
while run:
pygame.time.delay(100)
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
pygame.draw.rect(win, (0, 0, 255), (x, y, width, height))
pygame.display.update()
And error:
module 'pygame.display' has no attribute 'set_mod '
Good people, please help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeniy _, 2021-03-04
@AAA999222

It's simple: set_mod e ()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question