Need Coding Help - Year-Long Bug

@ChanceOfFire https://cogdemos.ink/play/nascent-soul-studios/phoenix-rising-demo/mygame

I put it on COGDemos, but I don’t know if I got codesharing set up right? I think I did? I checked the box for open source code?

@Writing_Fever
I mean that at the end of a choice you have to put an else, which leads it to the next section, right? but that’s not the way I had this section working. See, it was supposed to be like this section:

*elseif pc_sexuality_a = 2 

            *comment AceAro PC w/ Female Spouse

            A gentle wife clad in red beside you,

            *if pc_gender = 1

              *comment Male AceAro PC w/ Female Spouse

              a red veil over her face as you stand next to her at the altar. You hold her small, pale hand in your own and you swear, internally, to protect her as a husband should, if only to avoid the trouble of your families growing angry. You imagine how you'd shake with joy during your three bows, one to heaven, one to your parents, one to your wife. You imagine the wedding feast and the wedding night, those soft, crimson-nailed hands holding yours as you explain your thoughts on what intimacies may or may not be necessary throughout your marriage.




              You imagine a year or two of just the two of you building a life together, a perfect partnership spent learning and benefitting from one another's presence, before one of you broaches the subject of children. 

              *if (footnotes)

                *gosub_scene subroutines footnotes_sub

              *fake_choice

                #[i]I've always wanted to be a father.[/i]

                  *set PC_wants_babies true

                  Ever practical, your daydreams halt only slightly to consider logistics, especially when your own feelings on carnal intimacy are involved. @{((dept_palace = "Clothing Department") or (dept_palace = "Shangfu Department")) As you tie off a thread and begin threading your needle once more,|}@{((dept_palace = "Palace Kitchen") or (dept_palace = "Shangshi Kitchens")) As you wipe more vegetables from your blade,|}@{((dept_palace = "Tea Store") or (dept_palace = "Shangcha Department")) As you set another tray in the pile,|} you turn your mind to the question of how the children would come into being.

                  *if (footnotes)

                    *gosub_scene subroutines footnotes_sub

                  *fake_choice

                    #[i]Adoption, perhaps.[/i]

                      Just because you want to raise a child with your capable wife doesn't mean she must bear the pains of childbirth, at least in your daydreams. In your daydreams, you instead imagine finding a child from the streets or a child from some poor family. You imagine picking up this child and bundling them into your shared care, and raising them with strict love.




                      You imagine the child growing up, a sweet, gentle bundle of joy who never causes you two troubles. You imagine the child living a long, happy life, and eventually bringing you grandchildren.

                    #[i]My wife will bear our child.[/i]

                      A warm want fills your chest, as you imagine your dream-wife's belly swollen with child. Carefully ignoring the idea of complications that might take her from you, you imagine the child in your arms, and the gentle dream-bland mix of your face and your sweet wife's, and you think perhaps you'd be a good father.




                      You imagine the child growing up, a sweet, gentle bundle of joy who never causes you two troubles. You imagine the child living a long, happy life, and eventually bringing you grandchildren.

                    #[i]Someone else will bear our child.[/i]

                      Your heart squeezes at the thought of losing this dutiful wife of yours in the pains of childbirth. What noble-born rich man does not have concubines, anyway? Your daydreams fade fuzzy around this area, for sometimes you cannot stop yourself from being realistic, and in those daydreams, you consider some poor maid who bears your child in exchange for money, and is never seen again. 

                      

                      But when you can manage to let your fancies soar to new heights, you imagine a full back-court that you never have to entertain carnally unless you wish to, your concubines all happy and calm and never fighting with the @{footnotes Di-wife|First wife}. You imagine sometimes that one of them births the child for your loving and lovely wife. It is always a happy, cheerful little infant, and you are always happy to hold them. 




                      You imagine the child growing up, a sweet, gentle bundle of joy who never causes you two troubles. You imagine the child living a long, happy life, and eventually bringing you grandchildren.

                #[i]We'd put it aside, no children needed to get in between our love.[/i]

                  *if (footnotes)

                    *set FilialPiety_footnote true

                  Only in your daydreams do you put aside the fact that Filial Piety demands you continue your family line. Only in your daydreams do you admit you don't want them. Only in your daydreams do you imagine a long, happy life with just the love of your life by your side. 




                  You imagine days spent in wedded bliss, the two of you stretching out those halcyon days of first love into decades of enraptured infatuation. You let these thoughts buoy you, in your dark moments. 

            *elseif pc_gender = 2

              *if (footnotes)

                *set Greenhat_footnote true

              *comment Female AceAro PC w/ Female Spouse

              her gentle and small hand in your own, both of your nails painted celebration-red. Your painted lips smile under the sparkle of her dark eyes, and your heart thrills at the thought of the two of you enjoying the rest of your lives together.  You catch yourself imagining a marriage into your wife's husband's household, the two of you secretly making him wear a green hat. Sometimes,you imagine an upside down world with a happy, domestic life with the two of you together, a @{footnotes siheyuan|courtyard manor} just for you, no lawful husband in sight. 




              A year or two of just the two of you orchestrating your life together, providing backup and support for each other, before one of you broach the subject of children.

              *if (footnotes)

                *gosub_scene subroutines footnotes_sub

              *fake_choice

                #[i]I've always wanted children.[/i]

                  *set PC_wants_babies true

                  Ever practical, your daydreams halt only slightly to consider logistics, especially with your own feelings on carnal intimacy. @{((dept_palace = "Clothing Department") or (dept_palace = "Shangfu Department")) As you tie off a thread and begin threading your needle once more,|}@{((dept_palace = "Palace Kitchen") or (dept_palace = "Shangshi Kitchens")) As you wipe more vegetables from your blade,|}@{((dept_palace = "Tea Store") or (dept_palace = "Shangcha Department")) As you set another tray in the pile,|} you turn your mind to the question of how the children would come into being.

                  *if (footnotes)

                    *gosub_scene subroutines footnotes_sub

                  *fake_choice       

                    #[i]I would birth our child myself.[/i]

                      A hollow sort of maternal wish fills your chest, as you imagine your belly swollen with child. Carefully ignoring the idea of how it got there, you imagine the child in your arms, and the gentle dream-bland mix of your face and your sweet wife's, and you think perhaps you'd be a good parent.

        

                      You imagine the child growing up, a sweet, gentle bundle of joy who never causes you two troubles. You imagine the child living a long, happy life, and eventually bringing you grandchildren.

                    #[i]My wife would birth our child.[/i]

                      A warm want fills your chest, as you imagine your dream-wife's belly swollen with child. Carefully ignoring the idea of complications that might take her from you, you imagine the child in your arms, and the gentle dream-bland mix of your face and your sweet wife's, and you think perhaps you'd be a good parent.

        

                      You imagine the child growing up, a sweet, gentle bundle of joy who never causes you two troubles. You imagine the child living a long, happy life, and eventually bringing you grandchildren.

                    #[i]Why should either of us birth it, when concubines exist?[/i]

                      What noble-born rich man does not have concubines? Your daydreams revolve between many options, and sometimes it settles on the two of you being concubines to a husband who can sire the child for the both of you. Other times, you or your wife are rich and noble yourselves, and therefore there is a concubine to provide a child for you and then conveniently die off. It is always a happy, cheerful little infant, and you are always happy to hold them. 

        

                      You imagine the child growing up, a sweet, gentle bundle of joy who never causes you two troubles. You imagine the child living a long, happy life, and eventually bringing you grandchildren.

                    #[i]Adoption is an option.[/i]

                      Just because you want to raise a child with your capable wife doesn't mean either of you must bear a child, at least in your daydreams. In your daydreams, you instead imagine finding a child from the streets or a child from some poor family. You imagine picking up this child and bundling them into your shared care, and raising them with strict love.

        

                      You imagine the child growing up, a sweet, gentle bundle of joy who never causes you two troubles. You imagine the child living a long, happy life, and eventually bringing you grandchildren.

                #[i]We'd put it aside, no children needed to get in between our love.[/i]

                  *if (footnotes)

                    *set FilialPiety_footnote true

                  Only in your daydreams do you put aside the fact that Filial Piety demands you continue your family line. Only in your daydreams do you admit you don't want them. Only in your daydreams do you imagine a long, happy life with just the love of your life by your side. 




                  You imagine days spent in wedded bliss, the two of you stretching out those halcyon days of first love into decades of enraptured infatuation. You let these thoughts buoy you, in your dark moments. 

THIS section works without the error showing up, for some goddamn reason. TAT

Footnotes is a boolean:

As for Quickstest and Randomtest, yes I know it needs to pass them, and eventually it’ll be able to, I’m sure, but right now its NOT able to because of this fucking bug. TAT

((Also I apologize to anyone if the cursing is getting a bit much, but it’s my emotional support crutch, so please be patient with me.))

Quicktest results:

And it gets the same thing back when I try to run the randomtest… but the thing is I don’t think I’m DOING it right, I dunno, it doesn’t seem the same as it used to when I tried to run it and I can’t remember HOW to run it through VSCode. TAT It’s been MONTHS and MONTHS since the last time I did this.

Okay, I didn’t get any different result trying to use randomtest (I think choicescript extension may not be working right???)

But I did do a quick playtest to show you guys what error happened:

So there’s that bit of data for you.

Lines 1126-1130, btw:




    Another option was to attach yourself to one of the Palace Mistresses as a chance of meeting $!{Chengling_title} and perhaps catching ${Chengling_his} eyes. @{PC_sexuality A loving marriage between yourself and the ${Chengling_title2} was the sort of amazing chance that you found yourself daydreaming over often. Rolling it around your mind in rose-colored, flower-scented thought, as if it would lift you up from your lowly station.|A marriage into the Imperial Family, even as a concubine, would be enough to lift you up from your lowly station. Your father would benefit so long as you were favored, your brothers and sisters gaining fame and accolades. Being that important made your fingers tingle.|A romantic rendevous with ${Chengling_his} Majesty alone was enough to set your heart pounding. After all, if you could be truly interesting, truly beautiful enough to turn the head of someone so important didn't that mean you were worth something? Didn't that mean you had earned true love?|While you turn up your nose at the idea of your entire future being hung on someone's attention being paid to you, much less having to entertain such amorous attentions, you had to admit that the Palace Mistresses ate and slept and lived better than any of the servants in the palace, and way better than your life at home. It might be worth it, faking such adoration and care, in exchange for wealth… although it would be counter to your own feelings.}




    Of course, if you can find a way to distinguish yourself, you could perhaps live on your own, earning a living. There were ways to do so, and while you'd have to pay homage and your family would still be free to try and make use of you, if you were clever you could manage it. You just needed an idea, a business you could do to earn yourself some income. 

    

    Today, your imagination takes you to the thought of -

((Heads up, gonna be away from the computer for a while, due to funeral, therefore will not be able to upload screenshots or code snippets until later.))

3 Likes