HOW TO: Labels and Gotos 🖤

Hey there, I’m going to talk about labels and gotos! :wave: :revolving_hearts:

A goto leads to a label that it shares the same name with. For example goto friend would lead to label friend. You can have duplicate gotos within an episode that all share the same name but you can’t have duplicate labels in an episode. This can be seen with a customization template; for example, when you’re getting your hair customized and choosing from short hair styles, all the gotos share the same name and will lead you back to one label for short hair styles. In addition, you can name your label and goto anything however label and goto names cannot contain spaces or special characters such as &. If you write label spooky house, you will get an error. You also can’t end an episode on a label. Another thing is that labels cannot go inside of if/elif/else statements and they can’t go inside of choices. Instead, you’ll need to put a goto in if/elif/else statements and/or choices and this would lead to a label outside of them. Then you can use another goto to merge both pathways, and this that would lead to a label that it shares the same name with.

Here’s an example I showed someone in regards to labels & if/elif/else statements & choices:

You can’t have labels inside of if/elif/else statements and you can’t have labels inside of choices.

THIS is WRONG:

NARR
Pick your fav color.

choice
“Blue”{
label blue_color
}

It is also wrong to have it inside of if/elif/else.

You need to have a goto that leads to a label outside of them.

*Example over.

Anyways, to continue:

A reminder that if you do get a duplicate label warning because you have two labels (let’s say label makeup) in your episode, you can fix the duplicate label by either adding something to it or re-naming it. For example, I can add a 2 to it so that it becomes label makeup2. However, remember that if you do this, you need to add a 2 to the gotos as well so that they will lead to label makeup2 (so, ONLY for the gotos that would lead to this label). If you forget to do this, then you’ll get an error saying your label doesn’t exist. If you do add a 2 to the gotos so that it becomes goto makeup2 but miss one, then what will happen is that goto makeup in your second makeup game that you labeled makeup2 will lead ALL THE WAY back to label makeup which will just mess up everything up. You don’t want that, you want a smooth flow to your story. So yeah, if you have a dressing game in your episode, and decide to use it again, you will need to change the label for the second one and make sure the gotos of the second dressing game match the new label you use as well.

The duplicate labels rule is only present per episode. If you use label fun in episode 1, you can use it again once in episode 2 and so forth.

P.S I go more into why it’s bad to duplicate labels on my thread: JemU776's Help Thread (link will automatically lead you to the post about it)

Feel free to check it out <3

Here’s a picture:

Let me know if you want me to post anything else and I hope that this helps, now I’m off to listen to MIW and other cool bands/singers xoxo :kiss:

^^

18 Likes
HELP! If/elif/else goto
JemU776's Help Thread
My script is all messed up. I'm trying to allow charcater to choose
"Stupid" questions that never get answered? Get The Help Here!
HOW: Help, I want my story to be two languages
"Stupid" questions that never get answered? Get The Help Here!
"Stupid" questions that never get answered? Get The Help Here!
"Stupid" questions that never get answered? Get The Help Here!
Appreciation Thread For Jem! :heart:
"Stupid" questions that never get answered? Get The Help Here!
Advanced script help
How to do this type of thing
:four_leaf_clover: HOW TO: Choice Inside Choice :yay:
Help with limited customization xxxx
Choices help once again pleaseee
Editing assistant help?
Can I make the readers choose who character they will be playing as?
ERROR! Help me!
I need some script help plz!
Label error with tappable OL
JemU776's Help Thread
Ending script help
"Stupid" questions that never get answered? Get The Help Here!
Practice Creating Mini-CC templates! :heart:
:unicorn: JemU776's Magical Reviews (Temp Closed) :lollipop:
How to make multiple choices in a choice?
:black_heart: TEMPLATE: Showing Individual Character Points in A Choice :white_heart:
How to lock chapters during revamp?
Locked choices and point system
Directing and choices
JemU776's Help Thread
"Stupid" questions that never get answered? Get The Help Here!
Coding bug 🦠 Helppp!
Send help please
Using a choice to go back
Looping Choices?
Visual CC Help?
HOW TO: Reset Story Progress + Bonus Stuff :blob_sun:
HELP: Selecting a character to customize
Need help with name choosing for 2 LL characters, one female, one male
What happens after the reader makes a choice?
HOW TO: Color Code and Lock A Choice
"Stupid" questions that never get answered? Get The Help Here!
Coding for MC gender and their love interest's gender
Why is my script not working
Overlay + error 11 help!
Help! I don't understand this!
"Stupid" questions that never get answered? Get The Help Here!
It says my labels wrong

Thanks for checking this out guys, you all rock :tulip: :rose:

BRANDI (think_rubchin)
(Should I enter this haunted house or not?)

The ) should be there, it’s making my eye twitch lol :joy:

2 Likes

Love it Jem! Thank you! BOOKMARKED! :heart_eyes::heart_eyes::heart_eyes::heart_eyes::heart_eyes::heart_eyes::fire::fire::fire::fire::fire::fire::fire::blush::blush::blush::blush::blush::blush:

1 Like

Jem you are a gem! :yay:
I needed this to.

2 Likes

@lanafrazer_episode and @xxLoveAaliyah thank u guys :nerd_face:

3 Likes

Bump :disco:

1 Like

This is absolutely amazing! Thank youuuu!! :heart:

1 Like

Bump :100:

Bump :blob_sun:

Bump :chef:

Bump :chef: :chef:

Bump :chef:

FF: I learned how labels and gotos work after creating my own CC template :joy:

Bump :metal2: :v: :black_heart: :metal: :black_joker:

1 Like

Bump! :blob_sun:

Remember guys you cannot have a customization template inside of if/elif/else and choices. It has to be outside of them. This is because labels aren’t allowed inside of if/elif/else and choices and a CC template is full of labels.

Some examples below:

Incorrect:

NARR
Who would you like to customize?

choice
“Jem”{
#CC template for Jem
}“Brandi”{
#CC template for Brandi
}“Done”{
NARR
Very well, let’s move on!
}
#continue (incorrectly coded) story

How to fix this, correct:

label friends

NARR
Who would you like to customize?

choice
“Jem”{
goto gem
}“Brandi”{
goto flower
}“Done”{
goto finish
}

label gem
#CC template for Jem
goto friends

label flower
#CC template for Brandi
goto friends

label finish
NARR
Very well, let’s move on!
#continue (correctly coded) story

Same applies to if/elif/else.

Incorrect:

if (HERO){
#CC template for Jem
}else{
#CC template for Brandi
}

Correct:

if (HERO){
goto gem
}else{
goto flower
}

label gem
#CC template for Jem
goto storyline

label flower
#CC template for Brandi
goto storyline

label storyline
#continue story

…So yeah, just remember that labels cannot go inside of choices and if/elif/else statements but luckily gotos can!

Bump. :penguin:

1 Like

Can also be written like:

goto label friend

The command redo exists as well.

Ex.
redo friend

The difference between a redo and a goto:

You can write a full storyline under a label.

I’d recommend this if the full story-lines are EXTREMELY different (ex. a guy love option path under one label and a girl love option path under a different label) Regardless, you’ll need a goto at the end of the storyline that takes the reader to a label it shares the same name with, so they can read through the ending credits. Forgetting to do this means the reader will read through the other path as well which is something you don’t want (a big no-no).

You can write both of the scenes under separate labels. If the story-lines for both girls are very different, then yes, I’d recommend to write the whole story-line under that label.

Ex.

#choice that decides what path you want to play as if you’re on the first episode. If episodes 2 and up, if/elif/else method can be used to lead to a path.

label no_shower
#whole story line here for girl who went to work without showering
goto end

label drunk_ok
#whole story-line here for girl who got so drunk and ends up in jail
goto end

label end
#ending credits

But if the storyline is about the same girl and based on a decision the reader picks, you can just use labels to show the actions of what they selected and then merge back to the main storyline.

#there would be coding above here, leading to the separate paths.

label no_shower
#scene for girl going to work without showering. Doesn’t take up full episode and once it’s over:

goto merge

label drunk_ok
#scene here for girl who got so drunk and ends up in jail, doesn’t take up full episode and once it’s over:

goto merge

label merge
#story-line is back to main

I believe this is what you mean, hope it’s understandable :blob_hearts:

1 Like

Thank you! I accidentally deleted the post as I was trying to edit it :joy::two_hearts:

1 Like

:joy: haha, i love you so much :yay: :kissing_heart: :blob_hearts:

1 Like