Step 6: Debugging challenge!
Computers will follow whatever sequence of instructions they are given, even if those instructions are wrong.
> Click on Level 6 to open it. > Click Play and click on Level 6 to test the game.
Uh oh. This level has a pre-programmed Chicken, but there is a mistake in the code so the control script isn't working properly. This is called having a 'bug' in our script.
Let's see if we can hunt these bugs down and exterminate them.
> Right-click on the Chicken to Edit its script.
Here's how the buggy blocks look:
First let's go through the code and fix the blocks so that the W, A, S, and D keys work again.
You can review Step 4 if you need a reminder of how the blocks should look.
If you need to find a number block, open Operators and scroll down to the Numeric section. > Click Play to test the game to make sure the chicken is moving properly again.
When you are ready continue to the next step.
Otherwise, look back over your Script and have another go at spotting those bugs.