What's wrong with my code? (If's and remembering choices

So I’m just awful with the only if and remembering choices and I can’t figure out what I’m doing wrong with this. I basically want to show who the character is allies with at the end of the episode, and their allies are decided by choices, if that makes sense. So depending on the choice, their ally would be different

Here’s what I have

label allies
if (ava_vs_alice is “Alice(right)”) {
NARRATOR
You are allies with Alice
}
if (ava_vs_alice is “Ava(left)”) {
NARRATOR
You are allies with Ava

Help would be much appreciated

the second should be an elif, not an if.

label allies
if (ava_vs_alice is “Alice(right)”) {
NARRATOR
You are allies with Alice
}
elif (ava_vs_alice is “Ava(left)”) {
NARRATOR
You are allies with Ava

I’m pretty sure you need an else catch too, but I’m not sure so try without.

I think you ned an else so you can try:

label allies
if (ava_vs_alice is “Alice (right)”) {
NARRATOR
You are allies with Alice
} else {
NARRATOR
You are allies with Ava
}

I think you use elif for when you have 3 or more options but otherwise it’s just if and else

1 Like

That didn’t work either :confused: if it helps, the error is
Unexpected garbage: the text on this line does not follow our formatting

1 Like

What line?

Like @Miss.Barbie said, which line specifically?

1 Like

if (ava_vs_alice is “Alice (right)”) {

1 Like

I know this sounds really obvious but are you sure everything on that line is spelled correctly?

Yeah it’s all spelt right I just checked

1 Like

Maybe try leaving a line between

label allies

and

if (ava_vs_alice is “Alice (right)”) {

label allies

if (ava_vs_alice is “Alice (right)”) {
NARRATOR
You are allies with Alice
} else {
NARRATOR
You are allies with Ava
}

That didn’t work either

Ugh I usually use gains :pensive:
Maybe use capital letters for the choice name so

if (AVA_VS_ALICE…

Tbh I’m kinda just guessing now :joy:

1 Like

I just tried gains and I think it worked so thanks!

2 Likes

Closed: Marked as solved by op @b.e.c.c.a :yay: Thanks to @Evilyn and everyone else for all the help :v: