I’m having trouble with my choicescript and I keep getting the non- existent variable error for “house”. Where it says “*if House Ruddhale” I keep getting the error, however, I feel as if I don’t need to create the create variable thing in the startup. Need Helpstrong text
My code looks like this:
*temp alliegance_name
*set alliegance_name "override_alliegance"
*if House Ruddhale
*set alliegance_name "House Ruddhale"
*if override_alliegance = "None"
*if alliegance = House Stone
*set alliegance_name "House Stone"
*goto name
*elseif alliegance = House Mallor
*set alliegance_name "House Mallor"
*goto name
*elseif alliegance = House Crowe
*set alliegance_name "House Crowe"
*goto name
I want to make it so that if your alliegance, a variable in my game, is with House Ruddhale that’s what will be displayed in the stat chart, or if it is with another House such as House Crowe it will display that as your allegiance in the stat chart.
MeltingPenguins is correct. Your problem is that you have two values with no comparator. The expression that follows *if has to be something that evaluates to either true or false. That means a variable, a comparator, and an immediate value that the variable is being compared to. The value, if it’s pure text, has to be surrounded by quote marks - otherwise the code parser has no way to tell that it’s not a variable itself.
That’s where the ‘non-existant variable’ error comes from.
When you’re thinking ‘I need to check whether the MC belongs to House Blar’, translate that thought into ‘I need to check if the variable house has a value that’s equal to Blar’.
YOU ARE A LIFESAVER this way was the best for my current “skill level” aka it was super easy and although it took 3 hours Its finnaly over and thanks to everyone that helped out.