Is it possible to use *set after *if?

I have some choices that have 2 variations, and if one of the variations is met, I’d like to set the var to a different one… Idk how to explain I’ll just show the code here

The error I’m getting is: (line of: *set lunaneg = “uneasy”) Invalid expression at char9, expected NUMBER, STRING, VAR or PARENTHICAL, was: EQUALITY [=]

	#You shake your head, "I'm still hungry."
		*set genuine %+5
		*if lunaneg = "guarded"
			*set lunaneg = "uneasy"
			$!{She} blinks for a moment, before a soft chuckle escape ${her} lips. A fleeting spark dances in ${her} eyes, one which you cannot discern, "Then I guess we should head to the cafeteria first."

		*if lunaneg != "guarded"
			$!{She} laughs cheerfully at your answer, an easygoing look on ${her} face, "We can go to the cafeteria first, "We can go to the cafeteria first, they have more delicious food there."

If I remove the *set command it works fine. What can I do instead to achieve something similar? Thank you in advance!

ChoiceScript doesn’t use the = sign when setting variables: *set lunaneg "guarded" should work for you.


Oh my god I am an idiot!! Thank you :smiling_face_with_tear:

Not an idiot, I do the same thing the other way around when I go from ChoiceScript to ink! Glad to be helpful!

1 Like

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