If/Elif/Else... something goes wrong but can't figure it out!

Hi there!

So I’m trying to do something I’ve not really done before. Let me explain it to you:

I want my readers to be able to choose the characters they want to customize or not.

        NARRATOR
Would you like to change any characters or would you like to continue with the author's creations?

choice
“Yes, I’d love to”{
goto Leah_Braxton
gain Customize_all
}
“Only love interests”{
goto Love_interests
}
“Only Leah Braxton”{
goto Leah_Braxton
gain Leah_Braxton
}
“Continue Story”{
goto Fast_forward
}

This is what I got so far, at the end I got this:

label avatar_finished

        NARRATOR
Are you sure you're satisfied?

choice
“Yep! Let’s go”
if (Leah_Braxton) {
@zoom reset
&LEAH BRAXTON exits left AND LEAH BRAXTON is walk_neutral_offset
goto Fast_forward
}
elif (Customize_all) {
@zoom reset
&LEAH BRAXTON exits left AND LEAH BRAXTON is walk_neutral_offset AND MRS BRAXTON enters from right to screen center
}
“Nope! I made a mistake”{
goto avatar_0
}

When I save this, it says 'There is a { on line 25 that does not have a matching} (in this case it’s about the ‘Yes I’d love to’- part). Very annyoing, I tried to fix it and removed the flags, everything works fine without the gains (I thought, maybe I made a mistake elswhere), but it comes back to this everytime. It annoys me so much!

I simply want to give the readers the opportunity to either not customize at all or one character or all, but it’s kinda hard when things doesn’t go the way you want it to!

Could you help me out with this problem? Thanks!

You needed a bracket after “Yep! Let’s go” and you also need two brackets to close after the elif option (before the “Nope! I made a mistake”- a bracket was missing) but actually, since that was the last option, it should have been else (not elif). But you never had an elif for the love interests choice? I wasn’t sure if it was needed so I included it below:

choice
“Yep! Let’s go” {
if (Leah_Braxton) {
@zoom reset
&LEAH BRAXTON exits left AND LEAH BRAXTON is walk_neutral_offset
goto Fast_forward
} elif (Love_interests) {
#insert what you need to here
} else {
@zoom reset
&LEAH BRAXTON exits left AND LEAH BRAXTON is walk_neutral_offset AND MRS BRAXTON enters from right to screen center
}
} “Nope! I made a mistake”{
goto avatar_0
}

Thanks! I’ll remember it next time, for now I used the other method of remebering choices and it worked the way I wanted it to, but thank you anyway! (I was a little impatient… lol)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.