Something's wrong with my countdown

Papercount is a number that varies. Papercount is 6.
Burningness is a kind of value. The burningnesses are flaming and notburning.
The scrap of paper has a burningness. The scrap of paper is notburning.

Every turn when the the scrap of paper is flaming and papercount > 0:
	now papercount is papercount - 1.
Every turn when the scrap of paper is flaming and papercount = 0:
	now the scrap of paper is nowhere;
	now papercount is 6.

Problem. You wrote ‘Every turn when the scrap of paper is flaming and papercount = 0’ : but I don’t understand the ‘when/while’ clause, which should name activities or conditions.

See the manual: 18.4 > 18.4. While clauses

What have I butchered here?

You can’t use “=” in this way – in your last rule, just say “papercount is 0” and it should work.

(BTW, you can use the preformatted text option – it looks like “</>” in the little compose message window – to paste your code in as a single chunk and preserve formatting).

1 Like

Thanks, I think that has fixed it. I’m not returning an error anyway.