Skip to content Skip to sidebar Skip to footer

Typeerror: Argument Must Be Rect Style Object - Pygame (python

Possible Duplicate: Pygame (Python) - TypeError: Argument must be rect style object I am trying to make a brick breaker game in Pygame (with Python) but I am stuck at an error.

Solution 1:

The problem is that pygame expects everything in the array level1rects to be a rectange, and in this case, you must have something in that array that isn't.

Solution 2:

Your level1rects is currently a list of tuples, not rects because of:

rbrect = rb.get_rect().topleft = (0, 0)
rb1rect = rb1.get_rect().topleft = (40, 0)
rb2rect = rb2.get_rect().topleft = (80, 0)
level1rects = [rbrect, rb1rect, rb2rect]

Post a Comment for "Typeerror: Argument Must Be Rect Style Object - Pygame (python"