I am unsure why the *goto is seemingly going to the wrong *label

So, right now I have a group of 4 *gotos, however one of them does not seemingly want to go to it’s correct *label, and I am confused.
Currently, when I put n_embraces, see below, true, it goes to t_embraces instead.
see below

*label leaving2

I stretch once more before moving to enter the van, as I only had the trunk though I had assisted the others in packing their own luggage, before entering the van.


Well, I go to enter the van before my braced foot rolls as it had seemingly landed on something, before I start falling backwards.
*page_break
*if (t_embraces)
	*goto t_stop
*elseif (l_embraces)
	*goto l_stop
*elseif (n_embraces)
	*goto n_stop
*elseif (d_embraces)
	*goto d_stop
*label t_stop
an arm appears at my back that I then fall against, although it stops me from landing flat on my back on the hard cold ground, so there's that?


"Kindly explain how you arrived at this position, ${mc_fullname}?" ${t_name} asks, voice right by my ear before I'm gently pushed back to my feet while ${t_name}'s hand moves to grip my scruff, though only doing so tight enough that I won't fall over.


"Foot rolled." I mutter before dropping down in-order to figure out the hell I'd tripped on, with ${t_name}'s hand vanishing as I do so.
*goto staff
*label l_stop
a large hand grips my shoulder from behind and pushes forward so my backward momentom is haulted, before pushing me back upright while not letting go, though it's still loose enough I can remove said with little enough issue.


"Thanks." I say while turning to the tall ${l_person}, though said turn pulls my shoulder out of ${l_name}'s grip: "that could have been nasty if you weren't there, you know?"


"What happened?" ${l_name} asks while sounding concerned before: "also, are you alright, ${mc_first}?"


"Think so?" I part say and part ask before: "also, foot rolled on something." With that and an annoyed grumble, I crouch down to see what the hell I almost bashed my skull off the ground for, with ${l_name}'s hand moving to rest on my shoulder as I do so.
*goto staff
*label n_stop
a large thickly muscled arm raps around my torso from behind, with this stopping my momentom as I just fall backwards into
*if (n_gender ="female")
	a pair of ${n_breastsize) breasts.
	*goto n_stop2
*else
	a once again ${n_build} chest.
	*goto n_stop2
*label n_stop2
*page_break
"So." ${n_name} asks: "the fuck happened to you now?"


"Foot roled on something." I say, though I don't make to stand upright before: "though, need to figure out what I almost fell on."


"Fare enough." ${n_name} says before a large hand grips my shoulder before gently pushing me upright before: "if you were to squat while leaning against me, that would make problems." I grunt in agreement before squatting down to figure out the hell happened, though ${n_name}'s large warm hand doesn't leae my shoulder as I do.
*goto staff
*label d_stop
a small warm hand grips my upper arm from behind before stopping my momentom before: "are you OK?" ${d_name} asks, voice concerned.
*page_break
"foot roled on something." I say before: "going to check now." With that I squat to see what the hell I almost fell over, with ${d_name}'s hand remaining on my arm, though relaxing so it's no-longer gripping said, as I do so.
*goto staff

So yeah, at present I am unsure why N_embraces is going to t_embraces. Can any of you see something that I can’t?

Anyway, I hope that you all have a good rest of your week and weekend.

1 Like

If t_embraces is true as well, it takes priority in your *if statement and you’ll go to t_step while bypassing the elseifs below it.

Put this code below under *label leaving2 and tell us what you see.

*line_break
t_embraces: ${t_embraces}
*line_break
l_embraces: ${l_embraces}
*line_break
n_embraces: ${n_embraces}
*line_break
d_embraces: ${d_embraces}
*line_break
2 Likes

Code like this tends to make my head hurt. There’s so many ways for bugs to get in (like the one Chance mentioned.)

If only one person can “embrace” then why not have the variable “embrace” and then set it to t, l, n or d.

ie you embrace…

*fake_choice
  #T
    *set embrace "t"
  #L
    *set embrace "l"
etc

Then you don't really need the elseif's, just *if
*if (embrace = "t")
  *goto.....
*if (embrace = "l")
  *goto...

(Or wherever in the game you’re setting this variable.)
I mean you can do this anyway you want, but simplifying the number of variables is ideal unless you absolutely need one for each person IMO.

4 Likes

you have to show us where you set the n_embrace to TRUE

and if you want to make sure only n_embrace is set to true, you also have to set the other embraces to FALSE

the more variables you have means more micromanaging on every single one of them, so be careful

4 Likes

So, turns out that I had 2 N_embraces, one after another. Not sure how it wasn’t flagged as multiples of the same variable, but it’s fixed now.
Thanks all of you for assisting me in figuring this out.