QuickTest Error for Multireplace

For some reason, QuickTest is throwing errors on a few multireplaces I have in my chapter that shouldn’t be happening. The two spots where this happens is with one regarding a pronoun reference for the player’s gender:

"Nothing," Allen says with a dismissive wave. "I'm just trying to get rid of this dog my @{g son|daughter|child} picked up."

and a few more concerning a decision made in the previous chapter.

Carolyn turns to @{ch1save Allen and Alayna|Allen}.
#Stand with @{ch1save Allen and Alayna|Allen}.

The error I get for these is the same:

Error: ch2 line 272: invalid @{} at letter 90; 'g' is equal to 0 which is not a positive number

The issue with this error is that it is literally impossible to get to this point in the game without selecting your gender and without making the final decision at the end of the previous chapter. The max value of g is always 3 and the max value of ch1save is always 2. It’s never possible to reach these multireplaces with anything less than 1.

I read on this topic that this is the result of starting a numerical variable at 0 in startup.txt. QuickTest apparently tests all multireplaces with 0 if the variable initializes to 0. I would really prefer not to start the either of these variables at anything other than zero because one is used in the stats screen and the other is used at the end of the first chapter to display information regarding the player’s choices. I attempted the +1 method on both, but it just causes the multireplace to display incorrect information.

The only two workarounds I see are to either use *if instead (which I’d rather not do) or to skip the multireplaces when QuickTesting (which I don’t like doing and is impossible for the multireplace on the #option). So, is there a solution other than these two to make QuickTest stop being a brat?

EDIT: I’d also like to add that this problem doesn’t occur on my other project, where I use multireplace in the same manner as I do here with no QuickTest errors.

1 Like

I’m following this to see if anyone answers. I’m having the exact same issue. I use CSIDE, if that makes a difference. Randomtest passes just fine. Only Quicktest picks this up.

1 Like

We’re in the same boat. QuickTest always playing around. :roll_eyes:

You might have some luck writing this near the top of the file having the multireplace issue.

*if choice_quicktest
  *set g 1

That way, QT will set g to 1 and the multireplace lines later in that file will pass.


It worked! It seems so simple in hindsight. Thank you!

Thanks, @dfabulich!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.