Unit 3 lesson 22 planes

The program keeps telling my student is plane.touching is not a function. How do we fix this? This is how it is done in level 21

Link to the project or level: [

**when the plane touches the rock the rock is suppose to reset, and lose a point
What actually happens: [ error code}
What I’ve tried: [deleting it and redoing it, refreshing the screen]

Hello, @afrost, welcome to the forum! I did notice a few things that I think are causing the problem and fortunately, they are a pretty quick fix. The first problem I ran into, even before I found the error you mentioned is that your student has a sprite and a function, both with the same name (gas). I would change the function to a different name as the program is struggling when they both have the same name.

A similar problem is causing the error you mentioned. plane is defined as a sprite at the beginning of the program, but in lines 134, 137, 140 and 143 and then again in lines 149, 152, 155 and 158 the student is using plane as a number and not as a sprite. I believe the lines should read “score = score -1” and not “plane = score - 1”.

I think if your student corrects these lines, the problems should be resolved.

Let us know how it goes!

Mike

1 Like