0
The toggle is a device.
The toggle is switched on.
If the toggle is switched on:
    say "Hi there.".

The third line shows an error about punctuation, saying the phrase doesn't make sense. How is the punctuation wrong, it seems completely fine?

JJJ
  • 31,545
  • 20
  • 84
  • 99
user3892644
  • 123
  • 1
  • 5

1 Answers1

4

The error message is a bit misleading, but the core issue is that you need context for the if phrase. In other words, you need to define when the condition should be checked, otherwise it's too vague.

It's not entirely clear what you want the code to do, but you could have for example:

Every turn:
    if the toggle is switched on:
        say "Hi there."
JJJ
  • 31,545
  • 20
  • 84
  • 99