I keep getting various errors when attempting to have a choice appear only if TWO variables are met. Example:
#"Nothing. Go back inside."
#"I think I'll come in."
*if (gender = "Female") and (romanced >= 3) #"Could you stay?"
The most common error that I’m getting is “Invalid expression at character 18: expected no more tokens, found: CLOSE_PARANTHESIS [)].” But adding parantheses ((gender = “Female”) and (romanced >= 3)) also results in an error. Am I missing something really obvious here?
No worries! I’ve done plenty of interesting things whilst coding at one am (and one pm, for that matter…). It’s a bit confusing because *selectable_if and the like do very nicely on the same line, so it’s easy to get them muddled.
Yes! And I’m fairly sure *if has worked on the same line for me before… but the fact that I can’t remember now should say something! Off to bed for me… I can sleep better knowing that you solved the problem, haha!
I actually seemed to have the same error if one of the ifs was comparing things between “”. If it was comparing other things like numbers and had the proper double parenthesis set up, it seemed to work fine.
I think that turning implicit control flow on solved that, as I’m not getting that error anymore (it’s been a long time since I tested it though); try using that and reverting to the one line before and see if it works?
Implicit control flow is off by default. To use it, you have to *create implicit_control_flow true in startup.txt.