Quicktesting error?


#1

I’m having trouble with Quicktests, I have never really tried quicktest / randomtest before (preferring to test my games painfully and manually myself) but seeing as though I would like to try this new and cool way to quickly test for bugs I went and quicktested my game.

The error I got is:…

Error: startup line XXX: It is illegal to fall out of a *choice statement; you must *goto or *finish before the end of the indented block.

My code looks like this:

*label Age
Age: _______

You pause for a moment, the term reminded you of your
16th birthday last week. You almost forgot about it.

You write down your age on the paper.
*input_number Age 10 20
Write down ${age}?
*choice
  #Yes
    *set Age "${age}"
    *if Age <=15
      *set Age 0
      You chuckle at the thought of being a bit too young for high school.
      *line_break
      You realize that the paper should be answered seriously.

      You erase your answer and write it again.

      *goto Age

    *if (Age =16)
      
      *page_break
      *goto Somewhere

    *if (Age >16)
      You thought of writing an older age, but you realize that
      lying to the academy might not be a good idea.

      You erase your answer and write it again.

      *goto Age
    
  #No
    *goto Age

It keeps saying this line in particular is indented wrongly or doesn’t work…

#No
*goto Age

But I know it works because I tested it manually and I don’t see any problems with the code (I think).

Any help would be appreciated thanks.


#2

If you use *if/*elseif/*else instead of just *if, that will tell Quicktest that your *if statements cover all possible options via the *else catch-all.

So maybe try:

You write down your age on the paper.
*input_number Age 10 20
Write down ${age}?
*choice
  #Yes
    *set Age "${age}"
    *if Age <=15
      *set Age 0
      You chuckle at the thought of being a bit too young for high school.
      *line_break
      You realize that the paper should be answered seriously.

      You erase your answer and write it again.

      *goto Age

    *elseif (Age =16)
      
      *page_break
      *goto Somewhere

    *else
      You thought of writing an older age, but you realize that
      lying to the academy might not be a good idea.

      You erase your answer and write it again.

      *goto Age
    
  #No
    *goto Age

And see if that does the trick?

Also, it may be a problem (although it may not, I have never tried it so I’m not sure) to use ‘Age’ both as a {variable} and as a *label. Maybe change the name for the *label?

And finally, capital letters for variables can also cause weird results. I would make sure all instances of ‘age’-the-variable are all lowercase.

I hope one of these solutions will be helpful. (:


#3

Ah! It worked!!!

I did all 3 solutions just in case hahaha.

Thank you -oh great beta tester extraodinaire!

*label age_input
Age: _______

You pause for a moment, the term reminded you of your
16th birthday last week. You almost forgot about it.

You write down your age on the paper.
*input_number Age 10 20
Write down ${age}?
*choice
  #Yes
    *set Age "${age}"
    *if Age <=15
      *set Age 0
      You chuckle at the thought of being a bit too young for high school.
      *line_break
      You realize that the paper should be answered seriously.

      You erase your answer and write it again.

      *goto age_input

    *elseif (Age =16)
      
      *page_break
      *goto Family

    *else
      You thought of making yourself a bit older, but you realize that
      lying to the academy might not be a good idea.

      You erase your answer and write it again.

      *goto age_input
    
  #No
    *goto age_input