'pygame.rect' Object Is Not Callable
code: import pygame , sys, time, random from pygame.locals import * def enemie(): global speed, ball ball.y += speed if ball.y == 602: ball = pygame.Rect(rando
Solution 1:
Your global blast
variable shadows the blast
function. By the time you call blast()
, blast
is no longer defined as a function, but is a pygame.Rect
instead. The error is telling you that you can't call a Rect
like a function.
Change the name of one of them so they don't collide.
Post a Comment for "'pygame.rect' Object Is Not Callable"