Quicktest error with expressions/references

I’m having trouble with the use of an expression or reference (I’m not actually positive what it’s called) in quicktest. it works fine in randomtest, and in playing, so I’m assuming this is a syntax or formatting error I’m making or something.

The error I’m getting is: Error: smokeshow line 1596: Non-existent variable ‘ri’

My code looks like this:

Line 1596 (★):

		*if {show2&"RI"} ★
			it could be a nice excuse to get closer with them.
			it could be a nice thing for them to experience.

here is where the variable “show2” is set, further down in a gosub.

*label set_show2
*params date

*if (((date != "saf") and (date != "oni")) and (date != "ame"))
	*bug 'date' should be saf, oni, or ame; was ' ${date} '

*set {date&"Show2"} true
*set show2 date ★

*if (show1 = show2)
	*set sameShow true

the “date” parameter comes from a bunch of places, but always looks something like this

*gosub set_show2 "saf"
*gosub set_show2 "oni"
*gosub set_show2 "ame"

finally, the full variable I’m trying to call with {show2&“RI”} is either safRI, oniRI, or ameRI, all of which are set near the beginning of the of the file thusly:

*temp safRI false
*comment safRI = safir romantic interest (in pc)
*if (safrom >= midrom_pass)
	*set safRI true

I’m usually able to nudge things around until I get quicktest to work again, but not this time. any help or advice is greatly appreciated, thank you for your time.

what about using use separate *if statements for each condition?

1 Like

I think I might have to. I did realize later that I actually only need to call two of the three RI variables, so that won’t be so bad. still a little frustrating, as I feel like what I originally had should work, and can’t figure out why it doesn’t (for future cases, if nothing else). but thank you! I probably will just use *ifs then

I did end up doing this. I think the problem was *params, as I’ve had difficulty with those and quicktest before and I got this to pass quicktest

*if safShow2
	*set show2 "saf"
	*set show2 "oni"
*if {show2&"RI"}

thank you!

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