Need help with coding please :-)


#1

My if/elif/else is not working :frowning:

So here is the original choice:

    LUCIA
(I can't do this project with him, should I ask to be swapped?)

choice
“Yes”{
LUCIA (raise_hand)
Miss Paisley…
@speechbubble is 123 284 to 100% with tail_top_left
MISS PAISLEY
Lucia if you’re asking for a swap, the answer is no!
@LUCIA starts disappointed
}
“No, I just have to suck it up”{
@LUCIA starts idle_sad
}

Here is where it comes into play later on:

    DONNA (talk_arms_crossed_angry)
I'm going to ask Miss Paisley for a swap with Lucia. This is not fair to her.

@speechbubble is 130 235 to 100% with tail_top_right

if (yes){

    SAM (talk_apathetic)
I wouldn't bother, you heard what Miss Paisley said, no swaps.

@DONNA starts idle_sad

} else {
@DONNA starts arms_crossed_angry
}

SAM (talk_shrug)
Lucia seems to be handling it well.
Regardless of what the choice was, it goes straight to this:
SAM (talk_shrug)
Lucia seems to be handling it well.

I have used this before and it worked. Now, it’s not :frowning: Am I missing something here?


#2

Is this suppose to be a gain or the choice option name? If it’s a gain, then you need to add the gain. If it’s the choice option name, you need to use this format: (choice_name is “Yes”)

Read this guide: HOW TO: Remember Past Choices (if/elif/else)


#3

yes is the choice but I am using if/elif/ else. I read the guide and took the following:
if (label) {
} else {
}

Which is what I done but it doesn’t work :thinking:


#4

That is just an example of how the if/elif/else should look in general. Did you read through the whole guide? You completely missed this whole section:


#5

Thank you very much! :smile: