Python: rect argument is invalid [duplicate]
问题 This question already has an answer here : My pygame rects are giving a rect argument is invalid error (1 answer) Closed 3 months ago . Hi I'm trying to learn python and but i'm stuck with this problem, when i run my program it says rect argument is invalid, this is my code: import pygame pygame.init() win = pygame.display.set_mode((500,500)) pygame.display.set_caption("First game") x = 50 y = 50 width = 40 height = 60 vel = 5 run = True while run: pygame.time.delay(100) for event in pygame