If, elif, else problem


#1

I’ve written all right…
For example
label teacher_outfit
Then i added the choice too as teacher_outfit
if (teacher_outfit is Outfit 1)
stuff here
elif (teacher_outfit is Outfit 2)
stuff here
else (teacher_outfit is Outfit 3)
stuff here

It appears only the third choice…why?!
i used gains and labels but it doesn’t work well, or if someone could explain me how gains work for multiple choices? Thanks anyway!


#2

#3

Yes i’ve read it but it doesn’t work in my script :confused: idk why


#4

What’s your gain names?


#5

i had to redo like everything
So the gain for the outfits are:

  1. simple outfit
  2. teacher outfit 2
    3)teacher outfit 3

do i have to change something? I used the labels as well but it doesn’t work


#6

Gains can’t contain spaces. Can you show your choice?


#7

Sure :slight_smile:
Cattura%201
Cattura%202


Cattura%204
Cattura%205


#8

Gains should be in dressing game, and the dressing game is wrong, you need a confirmation of each choice.

Here’s the sample of dressing game with gains:


#9

Also, the naming choice option won’t work with remembering outfits.


#10

It does work with outfits. The “name your choice” method works just like gains, except for the “gain” part of course lol.


#11

Since you’re using the “naming the choice” method, you don’t need to use gains.


#12

Thank you so much! Also another question,if I write “do you like this outfit?” Etc. I’m afraid only one choice will appear,and not all the 3 choices…
I can’t explain I hope you’ve understand lol


#13

You have a goto there so if the reader doesn’t like the outfit it will go back to a dressing game


#14

So, i’ve tried as you did sending me the document “dressing game with gains” and it still appear the third choice even if i chose the second outfit…
Btw thanks for helping! you’re amazing, really


#15

So what do i have to do?


#16

Did you reset your story progress?


#17

Yup, it all remains the same… :confounded:


#18

(choice_name is “Option Name”)

What you put inside the quotes for the if/elif needs to match exactly what you have inside the quotes for your choice.

So if my choice is this:

choice (choice_name)
I’m So ExCITed!!!” {

I need to put exactly that inside the quotes for the if, even with all three exclamation points.

if (choice_name is “I’m So ExCITed!!!”)

You have a space after the number 1 in “Teacher Outfit 1” in the choice:

choice (teacher_outfit)
<PREMIUM> "Teacher Outfit 1 " {

You need to either remove that space, or add the space to the if/elif part


#19

But i’ve done it

If%2Celif%2Celse%20part%201
If%2C%20elif%2C%20else%20part%202


#20

No, you still have a space between 1 and the quote