Overlap Sprites and Groups Error


I need some help/another set of eyes to go through my student’s game. I am not catching the problem with the error on line 69. Can you please help?

Link to game: Game Lab - Code.org

The error is as follows:

ERROR: Line: 68: Error: Error: overlap can only be checked between sprites or groups

Press the up arrow to start and get the green ball to the top of the screen (y is less than zero) to see the error. I am sure the error is something else with the code that affects line 68.

I’ve looked through lines of code, fixed quotes, variables, and errors that I’ve caught. I am not seeing the problem. Any advice is greatly appreciated.



Hi @mrosen!

I used this great post on overlap to help focus on finding the issue. I looked where the sprite might be assigned to something that makes the program think it is no longer a sprite. On line 87, ball_sprite is assigned to 280 BUT I think the intent was to assign ball_sprite**.y** to 280. When I did that, I no longer got the error. Let us know if that helped things on your end.


1 Like