ERROR Unexpected IF: if HELP

Can someone help? I have something in the episode before this where my MC made a choice, what I’m trying to do is make a choice in this episode based as to whether she tells the truth about what option she picked in the last episode but can’t seem to code it without an error :frowning:

is there a choice after the if ?
because you dont have the word choice in there

1 Like

Yeah there should be the word ‘choice’ written after the if

1 Like

I’ve put it before the if as I need a line of dialogue before a choice :frowning: :slightly_frowning_face:

2 Likes

Then I get the error code
Unexpected choice: did you include a choice without a line of dialogue before it?

1 Like

Have you saved the choice in the previous episode?

Yeah, I’ve triple checked that🤦🏽‍♀️

1 Like

if (chose_kissle) {

choice “mention the kiss” {

dialogue

} “just mention the bed” {

dialogue

}

} elif {

choice " tell him you shared" {

dialogue

} “say you weren’t well” {

dialogue

}

}

2 Likes

@ShanJane this script should work

I then get this message :confused:

[quote=“Liz_Mar.episode, post:8, topic:469927, full:true”]

1 Like

#Should be.something like:

SKYLAR (talk_sarcastic)
And as your boyfriend I wouldn’t know of that?

if (chose_kissie){

@speechbubble is 160 237 to 0%

NARR
Pick a choice.

choice
“Mention the kiss”{

@speechbubble reset

#scene here, bla bla bla

}“Just tell him about the bed”{

@speechbubble reset

#scene here, bla bla bla

}
}elif (chose_sleep){

@speechbubble is 160 237 to 0%

NARR
Pick a choice.

choice
“Tell him you shared”{

@speechbubble reset

#scene here, bla bla bla

}“Say you weren’t well so you shared”{

@speechbubble reset

#scene here, bla bla bla

}
}

MILA (talk_exhausted)
And trust me…

#put the choice inside if/elif and within each option write speechbubble reset at the beginning because I used this trick: HOW TO: Have Choices Without Dialogue 🗯 💫

Also if you have 2 options to be remembered only, last one should be else always. Choice needs to have dialogue before it always but you can hide it by setting bubble to 0%

3 Likes

It might say that you need dialogue before the choice so add something like:

if (chose_kissle) {

CHARACTER
(Should I tell him about the kiss?)

choice

####what I sent before#####

2 Likes

Thank you so much it’s worked!

Another thing as you mentioned the if, elif and else,
Whenever I have 2 choices it never works when I put else on the last one? I always have to put elif then it works?
I’ve tried it so many times without elif and else instead but always comes up with an error?

1 Like

If & else should work. When you’re writting else, it needs to be written by itself. I see you’re using gains, in which case when you are trying other pathways, always make sure to reset your gains (which are called flags)

#Try writting

}else{

#instead of

And see what happens :blob_sun:

1 Like