If/elif problem

Can someone tell me what is wrong here? After a flashback she doesn’t wear her original outfit&co (it’s chose by the reader). I didn’t use “else” because I tried and she appeared only with the outfit next to else: } else {
@CLEO changes into Elegance is an attitude

}

The codes I used in this part of the episode are the same that I use at the beginning, but in that case it works.

This POST HERE should help you.

1 Like

Hey I tried to follow your advices but when Episode 2 starts my MC wears first outfit/hair/lipstick even if I chose other outfit&co. in Episode 1 :pensive:

Hi.
I’m suprised you got it to work the first time if you wrote it up like this :stuck_out_tongue_winking_eye:
Looking at I’m not 100% what code system you’re using - gains or brackets?

  • if using gains you can’t have a long name like that without _ between the words, else you get and error

ex
gain happy_color_black <— name to remember the choice

if (happy_color_black){ <— way to reference to the choice made

@CHARACTER changes into …

}

  • if using brackets you need to put in an if the choicename is inside the brackets as well as mark the alt name with quotationmarks “alt name”. Same applies with _ between the words.

ex
choice (happy_color) <— name to remember the choice

if (happy_color is “black”){ <—way to reference the choice choosen.
@CHARACTER changes into …
}

Regardless what system you choosen to use the if/elif/system should only have one if, as many elifs as you want and the finally one else, else the SC tend to now know what goes where, and end up always picking the else.

I’ve previously written a quick guide here, listing and going through the different ways to save choices through the storyline.

Hope this gives you a better understanding of how to solve your script. Happy coding.

<3

You have to reset story progress when you test out gains, otherwise you’re gaining s the gains when you test out all your choices

1 Like

Ahahah I know, I’m a new writer and sometimes I don’t really have idea of the codes I’m writing :joy: thank you!

Now it works! Thank you :heart:

Just happy to help… Glad you got it to work.

<3

Closing due to one month of inactivity :slight_smile: