Rude’s Here to Help! Ask your questions babes 💙

Hey girl! I saw your link on Dara’s website and was wondering if you could help. Below is my long if/else statement, and it has no errors on the portal. However, most circumstances (Slater having the most points, three characters equaling each other, or only two characters equaling each other) don’t result in the proper outcome. Do you think you could help me? Thank you!

if (BLAZE > CORDELIA) {

if (BLAZE > ZEPHYR) {

if (BLAZE > SLATER) {

#scene_here

goto AFTER_CHOICE

}}} elif (CORDELIA > BLAZE) {

if (CORDELIA > ZEPHYR) {

if (CORDELIA > SLATER) {

#scene_here

goto AFTER_CHOICE

}}} elif (ZEPHYR > BLAZE) {

if (ZEPHYR > CORDELIA) {

if (ZEPHYR > SLATER) {

#scene_here

Goto AFTER_CHOICE

}}} elif (SLATER > BLAZE) {

if (SLATER > CORDELIA) {

if (SLATER > ZEPHYR) {

#scene_here

Goto AFTER_CHOICE

}}} elif (BLAZE = CORDELIA) {

if (BLAZE = ZEPHYR) {

#scene_here

choice

“Fire Clan.” {

goto CHOOSE_FIRE

} “Water Clan.” {

goto CHOOSE_WATER

} “Air Clan.” {

goto CHOOSE_AIR

}

}} elif (BLAZE = CORDELIA) {

if (BLAZE = SLATER) {

#scene_here

choice

“Fire Clan.” {

goto CHOOSE_FIRE

} “Water Clan.” {

goto CHOOSE_WATER

} “Earth Clan.” {

goto CHOOSE_EARTH

}

}} elif (BLAZE = ZEPHYR) {

if (BLAZE = SLATER) {

#scene_here

choice

“Fire Clan.” {

goto CHOOSE_FIRE

} “Earth Clan.” {

goto CHOOSE_EARTH

} “Air Clan.” {

goto CHOOSE_AIR

}

}} elif (CORDELIA = ZEPHYR) {

if (CORDELIA = SLATER) {

#scene_here

choice

“Earth Clan.” {

goto CHOOSE_EARTH

} “Water Clan.” {

goto CHOOSE_WATER

} “Air Clan.” {

goto CHOOSE_AIR

}

}} elif (BLAZE = CORDELIA) {

#scene_here

choice

“Fire Clan.” {

goto CHOOSE_FIRE

} “Water Clan.” {

goto CHOOSE_WATER

}

} elif (BLAZE = ZEPHYR) {

#scene_here

choice

“Fire Clan.” {

goto CHOOSE_FIRE

} “Air Clan.” {

goto CHOOSE_AIR

}

} elif (BLAZE = SLATER) {

#scene_here

choice

“Fire Clan.” {

goto CHOOSE_FIRE

} “Earth Clan.” {

goto CHOOSE_EARTH

}

} elif (CORDELIA = ZEPHYR) {

#scene_here

choice

“Water Clan.” {

goto CHOOSE_WATER

} “Air Clan.” {

goto CHOOSE_AIR

}

} elif (CORDELIA = SLATER) {

#scene_here

choice

“Water Clan.” {

goto CHOOSE_WATER

} “Earth Clan.” {

goto CHOOSE_EARTH

}

} elif (ZEPHYR = SLATER) {

#scene_here

choice

“Air Clan.” {

goto CHOOSE_AIR

} “Earth Clan.” {

goto CHOOSE_EARTH

}

} else {

continue

}

#scene_here

choice

“Fire Clan.” {

goto CHOOSE_FIRE

} “Water Clan.” {

goto CHOOSE_WATER

} “Air Clan.” {

goto CHOOSE_AIR

} “Earth Clan.” {

goto CHOOSE_EARTH

}

Label CHOOSE_FIRE

#scene_here

Label CHOOSE_WATER

#scene_here

Label CHOOSE_AIR

#scene_here

Label CHOOSE_EARTH

#scene_here

Label AFTER_CHOICE

#scene here

Hey!

This is a long one :eyes::eyes::eyes::joy::joy:. I’ll be happy to help. Now, before I start going through it, I can already tell this is some complex branching. Are you very familiar with this type of coding?

Haha yes I’m so sorry for the length😅. I’m super comfortable with if/else statements and labels. Dara actually commented on another thread on how to do the whole multiple options in one statement as that was sort of new to me:

"If (CHAR1 > CHAR2) {

Elif (CHAR1 > CHAR2) {

}}"

But after doing it several times I was feeling confident about it (maybe prematurely lol).

Okay, cool!
I’ll take a look now

Ah thank you!

Okay, so the code looks fine in it’s set up. (REALLY awesome work btw, not a lot of people would try something so advanced). In all intents and purposes, this should work (unless I’m also missing something lol). I would recheck that your point system is placed accurately just to be sure. I would also split this code into two. The top part that always leads to AFTER_CHOICE might be better suited on its own, it would make the complex branch smaller which will make it easier to start spotting trouble areas. I would love to help more, but I would need to see your entire point system in order to do so because unless I missed my mark, the trouble isn’t here.

Feel free to pm me if you’d like to talk about this more cuz I’m actually very interested in this one.

I’m glad that the problem doesn’t seem to show up right away, thank you! I’ll make sure to double check all of my points. I was thinking of splitting it up as well, just wasn’t sure exactly how to do that without a line of dialogue. If I just ended the top half with “else { continue }” and started the the second half of if/else statements right away, would that work?

Basically my Character was in a flashback and I changed her outfit & hair (because you know it was a different point in time) After the flashback- how do I set my character back to the hair & outfit the reader chose for her??

1 Like

you have to use the if/elif/else system.
example:
if (wavy_parted) {
@CHAR changes hair into Long Wavy Parted Hair
}
if (purple dress) {
@CHAR changes into CHAR_purple_dress
}

1 Like

For the flashback right? & thank you so much. After will the outfit/hair go back to what the reader chose? (I’m sorry I’m asking so much I just like being sure I spent like 30 minutes trying to fix this lol)

1 Like

After the flashback you would use the if/elif/else system, for the flashback you would write:
@CHAR changes into CHAR_flashback_outfit

and then after the flashback it would be the example I gave.

1 Like

Thank you!

1 Like

I’m in the middle of writing my first chapter of my first story, so far I’ve got about 650 lines of code, I know the first chapter should usually be the longest (or one of the longest) but how long should it be?

Also any other tips for a new writer is appreciated :grin:

Don’t look at lines, we all have a different writing styles, just time reading and see how long it is.

Check out my thread here:

POLL: How long episodes / chapters should be?

Also, check out this one:

What makes you quit after the first episode?

2 Likes

Sorry for the late reply, no that won’t work. You can add a pause instead. Even if it’s for 0 seconds, it will then allow an if command afterwards.

I can’t believe I didn’t know that lol, thank you so much!

No worries, I would LOVE to read your story when you publish! Or maybe even if need beta testers for the first chapter.

It’s actually already out haha! It’s called Elements, you can find the link on my IG if you can’t find it: nelia.episode! That if/else is actually for one of the last chapters haha!

Oooh I’m even more intrigued!! Loll, I’ll definitely take a look.