I need help pleease!

Hi, I am trying to make an if else kinda thing but it ain’t working. Can someone help?

(Don’t mind the error in the location, just an error from screenshotting)

Screen Shot 2023-05-08 at 20.47.41
Thank you!

This is how the if/else command works. Delete line 5-12 and try using the code below and see if it works. What did you name your choice earlier? Put it where I put CHOICENAME, and then the main choices “green, silver” should be typed the exact way you did when you were coding the choice.

if (CHOICENAME is “green”) {
@OLIVIA changes into party 1
} elif(CHOICENAME is “silver”) {
@OLIVIA changes into party 2
} else {
@OLIVIA changes into party 3
}

If the code above doesn’t work, go to the previous chapter where you had the readers choose the outfit in the first place and check if the choices are the same. For example, if in the previous chapter the choices were “Green” “Silver” and “Blue”, then the if/else code would have to be “Green” “Silver” and “Blue” and not “Green” “Silver” and “Blue” with a full stop or “green” “silver” and “blue” with lowercases. It has to be the same.

2 Likes

try just removing line 5

1 Like

If you are using if/elif/else to remember a prior choice, you do not need to type the word “choice”

It’s just
if (CHOICENAME is “COLOR” ) {
@.CHARACTER changes into OUTFIT_COLOR1
} elif(CHOICENAME is “COLOR2”) {
@.CHARACTER changes into OUTFIT_COLOR2
}
else {
@.CHARACTER changes into OUTFIT_COLOR3
}

Replace @.CHARACTER with your character’s name and the “CHOICENAME” and “OUTFIT_COLOR1,2,3” with whatever you named the outfits, name of choice that you are trying to remember.

1 Like

Thank you so much

Does it work now?

1 Like

Yes, thanks!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.