0

I am trying to mix lists with bliting photos but i got error. Can anyone help me out!!! Thanks in advance.

I have list of rocks:

rocks = []

And then I am trying to say if rock hits something like:

...
if rock.y - rock.sl1 > hm.hitbox[1]:
...

But here i get error:

TypeError: unsupported operand type(s) for +: 'float' and 'pygame.Surface'

ro is class where my picture is load:

import pygame

sl1 = pygame.image.load('Game/1P.png')

If someone could help me and say how can I set that if statement there is problem.

noetix
  • 4,773
  • 3
  • 26
  • 47
aurora
  • 60
  • 1
  • 10

0 Answers0