Having a problem with redirecting a scene after a choice if anyone can advice id really appreciate it

Here is the code but every time i try to run it it either ignores the redirection or says its illegal to fall out of a choice.

*choice
#“It’s a pleasure to meet you Principal Starwalker.”
*set charm +2
*set Principal_Starwalker +3
*set discipline +2
*set Starwalker_attitude +2
“It’s a pleasure to meet you as well ${gender_title} ${surname}. It’s not often my students greet me so politely. Welcome to Morningstar Academy. Now I know you’re starting later than everyone else due to your… unique circumstances but we can discuss that further tomorrow after the term introductory assembly that will be held tomorrow evening after classes. You have arrived later today than I had anticipated so unfortunately there is no time for a tour of the grounds but I’m sure one of your roommates should be more than willing to show you around before classes begin tomorrow.” Principal Starwalker says which you immediately makes you look at her shocked. You hadn’t heard anything about what your living situation would be here at the academy let alone having to share a room. Catching sight of your expression Principal Starwalker uses all of her experience in dealing with young people to try to get you to see it in a positive light. “Now now, don’t worry it’s common practice to give people roommates during their time at the academy as it helps foster strong bonds and friendships that can last a lifetime.” After a short pause she adds in “Although the pair I’m putting you in a room with have had some… disagreements over their first term. I’m hoping adding you to their room may help act as a mediator so that they aren’t constantly at each other’s throats.” There’s the catch you could feel coming. You knew joining late would mean that you wouldn’t be able to just easily blend in. “I will take you to your dorm entrance and from there the attendant should be able to help you find your room.” Starwalker says as she begins to stride along the path and you hurry to keep up with her. After you are through the gate it begins to slowly close on it’s own and the dirt path shifts into a paved one.
*if gender = “male”
*set dorm “boy’s”
*goto dorm_boys
*elseif gender = “female”
*set dorm “girl’s”
*goto_scene dorm_girls
*elseif gender = “nonbinary”
*goto nb_dorm_choice

#“Umm h..hi there” you stammer
*set Principal_Starwalker +2
*set boldness -2
*set Starwalker_attitude +2
“I understand being in a new environment can be scary ${gender_title} ${surname} but you don’t have to be nervous. While it may take some adjusting I’m sure you’ll find your place here. Welcome to Morningstar Academy. Now I know you’re starting later than everyone else due to your… unique circumstances but we can discuss that further tomorrow after the term introductory assembly that will be held tomorrow evening after classes. You have arrived later today than I had anticipated so unfortunately there is no time for a tour of the grounds but I’m sure one of your roommates should be more than willing to show you around before classes begin tomorrow.” Principal Starwalker says which you immediately makes you look at her shocked. You hadn’t heard anything about what your living situation would be here at the academy let alone having to share a room. Catching sight of your expression Principal Starwalker uses all of her experience in dealing with young people to try to get you to see it in a positive light. “Now now, don’t worry it’s common practice to give people roommates during their time at the academy as it helps foster strong bonds and friendships that can last a lifetime.” After a short pause she adds in “Although the pair I’m putting you in a room with have had some… disagreements over their first term. I’m hoping adding you to their room may help act as a mediator so that they aren’t constantly at each other’s throats.” There’s the catch you could feel coming. You knew joining late would mean that you wouldn’t be able to just easily blend in. “I will take you to your dorm entrance and from there the attendant should be able to help you find your room.” Starwalker says as she begins to stride along the path and you hurry to keep up with her. After you are through the gate it begins to slowly close on it’s own and the dirt path shifts into a paved one.
*if gender = “male”
*set dorm “boy’s”
*goto dorm_boys
*elseif gender = “female”
*set dorm “girl’s”
*goto_scene dorm_girls
*elseif gender = “nonbinary”
*goto nb_dorm_choice

#“Gotta say your construct wasn’t the best driving companion since they can’t you know speak”
*set Starwalker_attitude -2
*set boldness +2
“While I appreciate a sense of humour ${gender_title} ${surname}, I prefer to get a proper introduction from my pupils. Anyway welcome to Morningstar Academy. Now I know you’re starting later than everyone else due to your… unique circumstances but we can discuss that further tomorrow after the term introductory assembly that will be held tomorrow evening after classes. You have arrived later today than I had anticipated so unfortunately there is no time for a tour of the grounds but I’m sure one of your roommates should be more than willing to show you around before classes begin tomorrow.” Principal Starwalker says which you immediately makes you look at her shocked. You hadn’t heard anything about what your living situation would be here at the academy let alone having to share a room. Catching sight of your expression Principal Starwalker uses all of her professional experience to quickly silence any protest you might come out with. "I’m afraid having a roommate isn’t a matter that is up for debate, everyone has a roommate during their time here. After a short pause she adds in “Although the pair I’m putting you in a room with have had some… disagreements over their first term. I’m hoping adding you to their room may help act as a mediator so that they aren’t constantly at each other’s throats.” There’s the catch you could feel coming. You knew joining late would mean that you wouldn’t be able to just easily blend in. “I will take you to your dorm entrance and from there the attendant should be able to help you find your room.” Starwalker says as she begins to stride along the path and you hurry to keep up with her. After you are through the gate it begins to slowly close on it’s own and the dirt path shifts into a paved one.
*if gender = “male”
*set dorm “boy’s”
*goto dorm_boys
*elseif gender = “female”
*set dorm “girl’s”
*goto_scene dorm_girls
*elseif gender = “nonbinary”
*goto nb_dorm_choice

#“I’d love to chat but after such a long drive I just wanna flop down into bed. Could we do this whole intro chat tomorrow?”
*set Principal_Starwalker -3
*set boldness +5
*set Starwalker_attitude -5
*set charm -3
“I understand the journey may have been long and tiring but I will not tolerate rudeness ${gender_title} ${surname}.” She gives you a stern look making it clear you won’t get anywhere unless you address her properly so you mumble a quick introduction. “Good enough for now but know that you will not earn any favours from me without manners.” Starwalker says still not looking satisfied with your introduction. Anyway welcome to Morningstar Academy. Now I know you’re starting later than everyone else due to your… unique circumstances but we can discuss that further tomorrow after the term introductory assembly that will be held tomorrow evening after classes. You have arrived later today than I had anticipated so unfortunately there is no time for a tour of the grounds but I’m sure one of your roommates should be more than willing to show you around before classes begin tomorrow." Principal Starwalker says which you immediately makes you look at her shocked. You hadn’t heard anything about what your living situation would be here at the academy let alone having to share a room. Catching sight of your expression Principal Starwalker uses all of her professional experience to quickly silence any protest you might come out with. "I’m afraid having a roommate isn’t a matter that is up for debate, everyone has a roommate during their time here. After a short pause she adds in “Although the pair I’m putting you in a room with have had some… disagreements over their first term. I’m hoping adding you to their room may help act as a mediator so that they aren’t constantly at each other’s throats.” There’s the catch you could feel coming. You knew joining late would mean that you wouldn’t be able to just easily blend in. “I will take you to your dorm entrance and from there the attendant should be able to help you find your room.” Starwalker says as she begins to stride along the path and you hurry to keep up with her. After you are through the gate it begins to slowly close on it’s own and the dirt path shifts into a paved one.
*if gender = “male”
*set dorm “boy’s”
*goto dorm_boys
*elseif gender = “female”
*set dorm “girl’s”
*goto_scene dorm_girls
*elseif gender = “nonbinary”
*goto nb_dorm_choice

*label nb_dorm_choice

Soon you and Starwalker reach a fork in the path which leads to 2 buildings. “Now I’ve been alerted to the fact that you’re Non-Binary so I’ll give you the choice between the boy’s and girl’s dorms. Which would you feel more comfortable in? There is a room available in each”

*choice
#I’d prefer the boy’s dorm
*set dorm “boy’s”
*goto_scene ch1dorm_boys

#Id prefer the girl’s dorm
*set dorm “girl’s”
*goto_scene ch1dorm_girls

could you add ` three of these before and after the code to convert it to code? this sounds either like an indentation error, let’s see where it is

or like there’s no *return in the scenes

1 Like

Use ``` before and after your code so we can see the formatting. It’s usually an indentation issue.

There could be a couple of issues causing this:

  1. If the variable gender is not set or does not match one of the values stated in the if-elseif block then the code doesn’t have anywhere to go and falls out of the choice. You can fix this by changing the last elseif gender = “nonbinary” to else and place the *goto nb_dorm_choicein there.
  2. If the scene file dorm_girls ends with a *return it will redirect back to where the goto was called. As there is no other *goto after it, the code falls out of the choice. This can be fixed by redirecting the flow from within dorm_girls to another scene instead of using return, or placing a *goto or *finishafter the *goto_scenebut still using return.
  3. It could be that the indenting is wrong somewhere, I copied the snippet provided and reformatted it as the formatting isn’t preserved when copy pasting from here into other editors, but it is quite common for an incorrect indent, or an extra space somewhere just to trip it up.

I hope this makes sense?

2 Likes

Thanks so much i realized the problem now and sorted it. Thanks for the help.