In my first chapter, the character has the ability to choose their gender early if they make a choice indicating that they’re into an RO that is gay. This seems to be causing issues with a check I implemented later in the chapter, where the original gender choice occurred. Specifically, QuickTest returns the following error:
Error: 9 line 460: invalid @{} at letter 7; 'g' is equal to 0 which is not a positive number
I am really not sure why this is happening. The check I created checks if the gender variable g
is equal to 0. If it is, the player is directed to the gender choice. If it’s not, the player simply states the gender they chose before. But for some reason, if the check goes to the version where they state the gender, it gives me the error that g = 0
, which shouldn’t be possible because that version of the text is only accessible if g != 0
.
Code
Code for the early gender selection, which is one of six choices on a choice tree:
*choice
#Uh, actually, I [i]like[/i] like Adrian. Like, a lot.
*set disable_likes_boys true
*set mc_likesadr true
*set adr +6
*set wall +1
Oooo, okay. That's completely understandable. After all, you spend a lot of time with him, and you both know each other super, super well. Plus, it doesn't hurt that Adrian is quite attractive. Anyone with eyes would be attracted to him.
There's just one major obstacle. Adrian is gay, and he only dates people who identify as male. Apologies for the brusqueness, but do you?
*choice
#I do!
*set g 1
*set he "he"
*set his "his"
*set him "him"
*set himself "himself"
Well then, here's wishing you well in your pursuit!
#No, I identify as female.
*set g 2
*set he "she"
*set his "her"
*set him "her"
*set himself "herself"
*goto toughluck
#No, I identify as non-binary.
*set g 3
*set he "they"
*set his "their"
*set him "them"
*set himself "themself"
*set plural true
*label toughluck
Ouch. Tough luck, huh? Maybe in another universe.
And here’s the gender check implemented at the regular gender scene:
*if g = 0
Sabrina looks at you, expectantly. A bit of a strange question, but you appreciate that she's at least being considerate enough to ask instead of assuming.
*label genchoice
*choice
#"I'm male."
*set g 1
*set he "he"
*set him "him"
*set his "his"
*set himself "himself"
#"I'm female."
*set g 2
*set he "she"
*set him "her"
*set his "her"
*set himself "herself"
#"I'm non-binary."
*set g 3
*set he "they"
*set him "them"
*set his "their"
*set himself "themself"
*set plural true
*else
"I'm @{g male|female|non-binary}," you reply.
*page_break
The code executes fine during gameplay (if you choose your gender early, you only state it later, etc.), so my only concern is getting this fixed so that I can say that the game passes QuickTest during submission to HG. It also makes my life easier when testing the game. Any help is greatly appreciated!