Trouble coding genders into the game

I’m not sure if I worded the title correctly but nevertheless…

Hello there, everyone! My name is Bd and I’ve been hard at work trying to bring back a game I posted here a while back. The story needed some serious revamping so I took a long hiatus and took that time to completely start over from scratch and continue on from there.

That being said I’ve had to relearn the coding again. One thing I’ve been having trouble with-- and can’t seem to find a way around it-- is getting the correct pronouns of your character to pop in the game. So far the game would say that you’re a “he” when the stats clearly say that you’re “she/they”. I know how to set your gender/gender identity into the game, but I can’t seem to get the characters in the story to use the proper pronouns when speaking to/about you. Maybe I’m just being stupid and the help can easily be found in the tutorial I’ve been shaking my fists at for the past few days. If that’s the case, then I’ll appreciate it if you point me in the right direction so I can take a good hard look at it.

If not, then any help would be appreciated! Thank you!

I did a tutorial on this. A Basic Tutorial on Name, Relationship and Gender Variables if that will help any.

If you could post a sample of your code though, or link to your game, we can point out what you’re doing wrong and help fix it.

1 Like

No, it’s all fine here! Thank you so much, that link was extremely helpful. You’re a lifesaver!

@FairyGodfeather always has good advice. If you start getting more complex than male and female (adding third-gender pronouns, keeping track of whether a character is trans, etc.) hit me up. I have a chart of variations and a scene coded to set them. :smile:


I am having a similar problem, but even copy and pasting the code from @FairyGodfeather’s tutorial doesn’t fix it.

In my startup.txt file I have:

*create gender “unknown”

And then in the scene I have:

Is it a boy’s name or a girl’s name?
  #I’m a girl.
    *set gender “female”
    *goto orientation
  #I’m a boy.
    *set gender “male”
    *goto orientation

But I keep getting the error message:
Invalid expression, couldn’t extract another token: “female”
or if I choose “I’m a boy”
Invalid expression, couldn’t extract another token: “male”

I’m so stuck. I can’t tell what is going wrong. Anyone have any ideas?

Thanks in advanced!

Please disregard my previous message. I figured it out :smile:

Something wonky happened when I opened the code in a different text editor. Just had to delete and retype that part and it works perfectly now.

Thanks anyway!

1 Like

It’s probably the quotes. ( " :arrow_left: Those things) Some text editors automatically change them to a curly version of them, and those don’t work with choicescript.