Choices error, help anyone?

I’ve been messing with this for agessssss and every time I fix an error, another one pops.
Okay, I know NOTHING of choices, and I’m trying to do the if-else thing here.
I’m using gains, and it tells me that a certain goto thingy is supposed to be ending the branch and that I need to move it to the end or delete the rest of the lines. What does that even mean?

Any help would be greatly appreciated!

:thinking: You’d have to show the section of your code around the red (x), and the exact wording of the error, so that we can pinpoint the exact problem.

My first impression, given what you said, is that your code may contain something like this:

if (hungry){

YOU
I’m hungry!

goto at_restaurant

AXEL
Then let’s go get some food, babe.

}else{

YOU
I’m not hungry.

}

^ In that case, with the goto not at the end of the “if” block, no reader would ever see Axel’s words, so it’s pointless to even have them in there. They should either be before the goto, or deleted entirely.

That’s my take on it anyway. If I misunderstood, then you can post your code and I’ll have another look. :+1:

1 Like

I don’t think my IQ allows me to understand this, but thank you! And here’s my script, by the way, exactly where the error appeared; the thing is, there are three photos. Two have a certain person in them. The MC is supposed to ask about that person, but I don’t know in which order the reader will look at the photos, so I had to create two separate versions for each one of those photos; one for a case where the MC has already learned about this person when looking at the other photo, and one for a case where she hasn’t seen them yet. If that makes sense. So she gains “knowing Silk”.

NARRATOR
Which photo do you want to look at first?

choice
“Right photo” {
if (knowingsilk) {
goto right_knowing
}
else {
goto photo_1
}
} “Middle photo” {
goto photo_2
} “Left photo” {
if (knowingsilk) {
goto left_knowing
else {
goto photo_3
}
“I’m done looking” {
goto photo_end
}

Oh, the error is just because the computer is confused. What actually happened is that you lost a bracket or two.

image

“if (knowingsilk)” and “Left photo” both lost their close brackets, so it should be:

} “Left photo” {
if (knowingsilk) {
goto left_knowing
} else {
goto photo_3
}
} “I’m done looking” {
goto photo_end
}

:+1:

1 Like

Thank you so much, I’ll try that!

1 Like

Omg it worked!!! You’re my hero!!!

1 Like

Glad I could help lol. :grin:

1 Like

Closed: marked as solved by op @Luna_Kesem :v: