Trouble setting basic pronouns

Hello! I’m new to ChoiceScript and coding in general. Currently, I’m trying to play around with it using basic commands. Here’s the problem: When I choose the male option, it doesn’t show anything. Previously, it did show something but it used Mx instead of Mr. I’m going crazyy.

Here’s my code:

*title Placeholder
*author Me

*create gender "undetermined"
*create mx "mx"

What is your gender?
*comment TODO remember to add an option for non-binary player characters.
*choice
    #Female
        *set gender "female"
        *goto gender_chosen
    #Male
        *set gender "male"
        *goto gender_chosen
    
*label gender_chosen
*if (gender = "female")
    *set mx "ms"
    We'll use ${gender} pronouns for you.
    *line_break
    We'll use the title $!{mx}.
*ending

*if (gender = male)
    *set mx "mr"
    We'll use ${gender} pronouns for you.
    *line_break
    We'll use the title $!{mx}.
*ending
2 Likes

Right now, your code is going right from *if (gender = “female”) to *ending.

That’s because *ending is not tabbed properly–it should be under “We’ll use the title $!{mx}.”

5 Likes

Gosh, that fixed it. Thank you! I also added double quotation marks on the male.

Indentation is gonna be a nightmare for me.

2 Likes

Why not use an additional variable in number? This will save a lot of your time and sanity.

*title Placeholder
*author Me

*create gender "undetermined"
*create sex 0
*create mx "mx"

What is your gender?
*comment TODO remember to add an option for non-binary player characters.
*choice
    #Female
        *set sex 1
        *set gender "female"
        *goto gender_chosen
    #Male
        *set sex 2
        *set gender "male"
        *goto gender_chosen
    
*label gender_chosen
*if (sex= 1)
    *set mx "ms"
    We'll use ${gender} pronouns for you.
    *line_break
    We'll use the title $!{mx}.

*if (sex= 2)
    *set mx "mr"
    We'll use ${gender} pronouns for you.
    *line_break
    We'll use the title $!{mx}.
*ending

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