Stats keep freezing

Hey everyone!

I’m having trouble with the stats section, whenever I click on it, It just freezes the whole game. I tried to press “CTRL+T” to find if there is a problem but I’m not getting any error at all. I can access it through the choice script or the note pad, but playing it on the browser or even in the application freezes the game.

My code looks like this:

*label start
[b]Character Details[/b]
*line_break
*if surname != ""
    Name: $!{pc_name}
    *goto Continue
*else
    Name: $!{pc_name} ${surname}
    *goto Continue
*label Continue
*line_break
*if pc_nickname = ""
    *goto Continue2
*else
     Nickname: $!{pc_nickname}
     *goto Continue2
*label Continue2
*line_break
*if pc_nickname = ""
    *goto Continue2
*else
     You have $!{eyes} with beautiful $!{skintone} skin. 
     
     You have a $!{build} with $!{hairC} colored $!{hairL}.
     *goto Continue2
*line_break
[b]Race:[/b] Vampire
*line_break
Your cuss word is: $!{Shit}

*if pc_name != "Unknown"
    *stat_chart
        opposed_pair Detached
            Caring
        opposed_pair Degenerate 
            Gentlemanly
        opposed_pair Vicious
            Dexterous
        opposed_pair Intimidating
            Inspiring
        opposed_pair Astute 
            Emotional
        opposed_pair Deceptive 
            Truthful
        opposed_pair Dominant
            Subservient
        percent Self-Hatred


*fake_choice
    *selectable_if (schoolknowledge = "True") #Do you want to know the lore of the world?
        *goto lore
    #Do you want to see your relationships?
        *goto relationships
    #Do you want to see what you have in your inventory?
        *goto invent
*label invent
[i]Things in your possession.[/i]
*if pendant = True
    You have your father's pendant. An ominous glow slowly emanates from it. 
*if pendant = False
    You're feeling empty. It's as if a part of your body has been cut off
*line_break
You have ${weapon} for a weapon.
*line_break
You have have ${Hex} Hex. 
*line_break
You have ${armor} for armor. 
*line_break
You have ${shield} for sheild
*line_break

*label relationships
*if pc_name != "Unknown"
    *if RO_Hayes = "True"
        *set Relationship_Hayes 100
        $!{Hayes_name} sees you as $!{Hayes_his} mate.
        *goto Continue5
    *elseif Relationship_Hayes > 75
        $!{Hayes_name} would give their life for you.
        *goto Continue5
    *elseif Relationship_Hayes > 65
        $!{Hayes_name} looks forward to spending time with you.
        *goto Continue5
    *elseif Relationship_Hayes > 55
        $!{Hayes_name} adores you and sees you as a good friend
        *goto Continue5
    *elseif Relationship_Hayes > 45
        $!{Hayes_name} enjoys you but at a distance
        *goto Continue5
    *elseif Relationship_Hayes < 35
        $!{Hayes_name} still cares for you but wishes that you wouldn't be an annoying idiot.
        *goto Continue5
*label Continue5
*page_break
*if pc_name != "Unknown"
    *if RO_Blaine = "True"
        *set Relationship_Blaine 100
        $!{Blaine_name} fantasizes about you when you're not around him
        *goto continue3
    *elseif Relationship_Blaine > 75
        Your relationship with $!{Blaine_name} is at it's peak. $!{Blaine_he} sees you as someone he could share his deepest secrets with.
        *goto continue3
    *elseif Relationship_Blaine > 65
        $!{Blaine_name} enjoys spending time with you
        *goto continue3
    *elseif Relationship_Blaine > 55
        After spending considerable time with $!{Blaine_name}, $!{Blaine_he} sees you as a close friend
        *goto continue3
    *elseif Relationship_Blaine > 45
        $!{Blaine_name} tries to spend more time around you
        *goto continue3
    *elseif Relationship_Blaine < 35
        You doubt there's anything that wouldn't stop ${Blaine_him} from caring about you.
        *goto continue3
*label continue3
*page_break
*if pc_name != "Unknown"
    *if RO_Valentine = "True"
        *set Relationship_Valentine 100
        $!{Valentine_name} loves you more then anything.
        *goto Continue4
    *elseif Relationship_Valentine >75 
        $!{Valentine_name} sees you as family.
        *goto Continue4
    *elseif Relationship_Valentine >65
        You're best friends with $!{Valentine_name}
        *goto Continue4
    *elseif Relationship_Valentine >55
        You're friends with $!{Valentine_name}
        *goto Continue4
    *elseif Relationship_Valentine >45
        $!{Valentine_name} sees you as an aquaintance
        *goto Continue4
    *elseif Relationship_Valentine <35
        You can see $!{Valentine_name} cares about you, but you've hurt ${Valentine_him} too much…
        *goto Continue4
*label Continue4

*goto start
*label lore
And the lore comes here.

This part is creating an infinite loop.

Thanks a lot! I’ve been trying to wrap my head around why it didn’t generate the error so I really appreciate it! <3

1 Like

You can only catch syntax errors before actually running the game. For logical errors, it’s best to use random test

If your case, randomtest would have failed because it would have visited the same label 10.000 times and it would have given you a place to start investigating.

2 Likes

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.