When it goes wrong

ReadingSteps in order

Sometimes a script does not do what you wanted. Every coder gets this, every day. Here is how to find the step that is wrong.

Be the slime

Read the script one line at a time, from the top. For each line, ask: what does the slime do now? Do not skip ahead.

Try it with this script. It should hop, say "Ta-da!", wait, then jump.

when I start
  hop left 1 block
  wait 1 second
  say "Ta-da!"
  jump
LineWhat the slime doesIs that what you wanted?
hop left 1 blockHops.Yes.
wait 1 secondStands still for a second.No! It should talk first.
say "Ta-da!"Starts to talk.
jumpJumps at once, still talking.

The first "No" is where the script goes wrong. Here the wait and the say are the wrong way round.

Three questions to ask

AskIt tells you
What did I want to happen?Where you are trying to get to.
What happened?Press Play and watch. Do not guess.
Which is the first step that is different?The step to fix.

Finish this section

Tick Finished reading at the bottom of the page. Then press Next. A dance needs fixing.