HELP! choice condition issue (RESOLVED)

I’m using condition for a choice, but both options appear regardless of the condition I set. Anyone has any idea of what I’m doing wrong?

NARR (MC)

choice “OPTION 1” { if (CG>2) {

}

} “OPTION 2” {if (CG<3) {
}

} “OPTION 3” { if ([CG>2] AND [CG<3]) {

}
}

1 Like

I think you’ve put more “}” than necessary!
Like, try this:

choice “OPTION 1” { if (CG>2) {

} “OPTION 2” {if (CG<3) {

} “OPTION 3” { if ([CG>2] AND [CG<3]) {

}

That’s what I did before, but I kept getting an error saying that there was a “{” missing for every line :pensive:

I think you got the format wrong for if, elif and else
It should be like this!..

choice “OPTION 1” { if (CG>2) {

} “OPTION 2” { elif (CG<3) {

} “OPTION 3” { else ([CG>2] AND [CG<3]) {

}

I hope this works.

1 Like

I get this error :weary:
Capture d’écran 2021-12-21 à 17.16.59

I know what I did wrong, I put too many “{”

the code should have been

So, you need to put the condition inside the bracket “{”.
Example: “CHOICE 1” if (condition) {
} “CHOICE 2” if (condition) {

}

Hopefully that prevents someone from loosing their minds lol

@Sydney_H Could you please close this thread? :slight_smile:

1 Like

Closed by OP request. :smiley: