I was just trying to make a rectangle in pygame as a variable, but it showed an error. I really don't know how to fix it. Can anyone help me? The code:
import pygame as py
screen = py.display.set_mode((1200, 700))
screen.fill((0, 0, 0))
rocket = py.draw.rect((screen), (225, 225, 225), (600, 350))
py.display.flip()
The error:
Traceback (most recent call last):
File "C:\Users\user\Desktop\Python\Project files\shooter_game.py", line 24, in <module>
rocket = py.draw.rect((screen), (225, 225, 225), (600, 350))
TypeError: Rect argument is invalid