Quicktest Failed

While once again running the quicktest command I ran into this bug:

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

Here’s the full block of code including line 389 (the one starting with “Eventually, the topic of conversation moves on and you hope they’ve forgotten about it. In any event, it was time to head back to the White House.”

*choice
    #Try to reassure them
        *if (relationshipFamily > 50)
            "Of course they didn't want to hurt us." You see their expressions start to soften, still sensing they feel unsure.
            
            "You know how we wear seatbelts in the car?"
            
            They both nod.
            
            "Well the Secret Service is like our seatbelts. We're always very, very safe in our cars, but we still wear a seatbelt just to be extra safe."
            
            *page_break
            
            They both start to smile and talk about the newest shows on TV. You can't believe that worked! 
            
            You knew you'd have to be honest with them about the dangers of being in the public eye one day, but right now they were just kids. It wouldn't serve anyone any good to make them more nervous than they already were.
            *set relationshipFamily %+25
            *page_break
            *goto lunchend
        *elseif
            "Of course they didn't want to hurt us." You can see that they still look unconvinced. You rack your brain for anything you could tell them to make them feel better but it's all static. You can only think to repeat yourself.
            
            "I'd tell you guys if there was any danger to us, you know that." ${child2} stares down at ${child2possessive} plate. They didn't buy it.
            
            Eventually, the topic of conversation moves on and you hope they've forgotten about it. In any event, it was time to head back to the White House.
            *set relationshipFamily %-15
            *page_break
            *goto lunchend
    #Be honest: being in the public spotlight isn't always safe
        *if (relationshipFamily > 55)
            "Well, kids, you're getting older so I want to be honest with you." You pause for a moment while trying to pick out the right words.
            
            "Sometimes being in the public eye does make things a little more unsafe, that's why we're always being extra cautious."
            
            ${child1} speaks up, "Thanks for not lying to us, ${Parent}." You switch topics and finish your meals before heading back to the White house.
            *set relationshipFamily %+30
            *page_break
            *goto lunchend
        *elseif
            "Well, kids, you're getting older so I want to be honest with you." You pause for a moment while trying to pick out the right words.
            
            "Sometimes being in the public eye does make things a little more unsafe, that's why we're always being extra cautious."
            
            You can see that they still look unconvinced. You rack your brain for anything you could tell them to make them feel better but it's all static. Eventually, the topic of conversation moves on and you hope they've forgotten about it. In any event, it was time to head back to the White House.
            *set relationshipFamily %-20
            *page_break
            *goto lunchend

When I play through it works fine, but quickest is labeling this and some other choices with the same issue. Thanks!

You are using

*if
*elseif

When it should be

*if
*else
1 Like

Just to be clear, you can use elseifs… but you’ve got to end with an else, to make sure all bases are covered.

1 Like

Exactly. Playing the game manually maybe doesn’t give you that error, but quicktest ensures to find all the errors, and if it encounters an *if it will check that at the end of the block there is an *else, if there is a *elseif it will keep searching for the *else, that’s why you should always end an *if statement with an *else and not with an *elseif.

1 Like

Also I’m pretty sure elseif should have a condition to check.

1 Like

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.