Blocks not functioning for student

My student’s code for isTouching() is correctly included but gives an error message:

Line 38 should run but is giving an error message as seen in the screenshot.

I compared the code to other students’ code and it is identical. I switched from block to text back to block to be sure it was written correctly. It switched from block to text to block and executed the same error each time. I made sure the sprites were correctly spelled in line 38 according to how they were initialized.

Screen Shot 2020-05-27 at 10.45.33 AM

This student had a similar error when trying to use a different block in Lesson 17.9:


I tried the same steps but was unable to fix that error as well. Any help is appreciated.

If you could share the link to the student project using the Share link we could help you debug this project much easier. Thank you!

Thank you, edavis. I did not realize I should use the share links.

Here is the link to Lesson 19.11: https://studio.code.org/projects/gamelab/SIlAyL_R3owvumeNwwPOjEXRa0PwQFqfZktRsK-rd8I

Here is the link to Lesson 17.11:

Hello @mkz4253,

I was able to take a look at your two projects and there are two different things going on here.

In the first one, the student creates the coin and then calls the setCoin function (on line 5). The setCoin function refers to the bunny, but the bunny hasn’t been created yet. If they move the setCoin function below the creation of the bunny, it should work.

In the 2nd one, there is a typo on line 36 where the student tries to change the flyer from a sprite to a number. I think they meant it to read flyer.velocityY = flyer.velocityY + 0.4; (but the .velocityY is missing from the first variable).

Hope this helps, but if you still have questions, we are more than happy to look at it again.

Mike