I made sure the variable “romancecaivral” was created, and there is a path where it is *set true, so I’m stumped on what is invalid.
Here’s what the code looks like
@{romancecaivral He winks at you as he shakes your hand and then joins the others in leaving the castle.|He shakes your hand and then joins the
other in leaving the castle.}
@{romancecaivral} He winks at you as he shakes your hand and then joins the others in leaving the castle.|He shakes your hand and then joins the
other in leaving the castle.
Although looking at that, I don’t think that’s going to work how you want it to. You’d have to refer to CS reference documentation on conditional stuff. I’ve not learned CS coding but where things line up with other coding I do I can point things out or spot where things might not work as expected but I’d need to try my hand with CS coding to get down to specifics.
@{romancecaivral “He winks at you as he shakes your hand and then joins the others in leaving the castle.” | “He shakes your hand and then joins the other in leaving the castle.”}
The error makes me think it’s trying to read your sentence as a variable. Try putting quotes in
@{romancecaivral “He winks at you as he shakes your hand and then joins the others in leaving the castle.”|”He shakes your hand and then joins the
other in leaving the castle.”}
#Ask General Caivral to dance
*set romancecaivral true
*set caivral %+20
This is how you get the variable to become true.
@{romancecaivral He winks at you as he shakes your hand and then joins the others in leaving the castle.|He shakes your hand and then joins the
other in leaving the castle.}
This is what I want to happen depending on whether romancecaivral is true or still false.
I have the variable created, and it is false in my startup.
If you need more code, just let me know what exactly you need
Hmm, my first instinct is to see whether you have a typo on the variable. “Romancecaivral” doesn’t look human friendly.
Try going the old way:
*if romancecaivral
He winks at you
*else
He doesn't wink
This way, at least we can see if the error is on the variable or your code syntax. I’m convinced the error takes place somewhere else, though. Like immediately above it.
Seeing if it was a typo was the first thing I checked, and that wasn’t it. I switched to the old fashioned way, and it works perfectly fine.
The line above the condition is:
The general comes up to you at one point. “Thank you for your heroism,” he says.
@{(romancecaivral) He winks at you as he shakes your hand and then joins the others in leaving the castle.|He shakes your hand and then joins the
other in leaving the castle.}
While I have you, I got another error, and I can’t for the life of me figure it out either.
The error doesn’t give me a scene, like how it usually will say “error: chapterone line 28; and then the error”
This on just says error: line 945: Not a number:. No scene at all in the error message.
Only one of my scenes has a line 945, and the line is:
${heirname} looks shocked, but quickly composed @{heirhis hiself|herself}. ${friendname} looks less than happy to hear you say that to the ${heirtitle}.
I know I’m not being helpful here, but bear with me. Is there any reason why you are set on having it as a multireplace, rather than an if-else? It seems to me there’s no clear advantage if you’re going to have to type both sentences in full either way. Am I missing something?
Quick curiosity. Are you on CS-IDE or any other third-party IDE, or going rambo through notepad and all those shell commands? When is the last time you have CS updated?
Good question. It looks a lot like you’re working with an old version of ChoiceScript, and so Multireplace is not behaving as expected. At a glance, your code looks like it should work.
I had no idea you don’t need to put parentheses () around a variable to see if it is true. That is going to save my left pinky even more by having to put less stress on it. That would be a good update in the wiki. Thanks for showing this Szaal.