All of the text and percent things set here have been indented by one space. Removing the indentation should fix the error hopefully?
*stat_chart
text Name
text Surname
text Age
text Power
text Gender
text wealth
text Skills
percent Agility
percent Charm
percent Intelligence
text Relations
percent Anemos
percent Kasai
percent Dahlia
percent Amanzi
percent Parents
that didnt work either but now i messed up this whole part it gave me a super long list of errors dealing with this
This is your stat screen.
*stat_chart
text Name
text Surname
text Age
text Power
text Gender
text wealth
text Skills
percent Agility
percent Charm
percent Intelligence
text Relations
percent Anemos
percent Kasai
percent Dahlia
percent Amanzi
percent Parents
and the error was of course
Illegal mixing of spaces and tabs; this line has a tab, but there were spaces on-
It doesn’t seem like you have spaces and tabs on the same line, but you have tabs in the empty lines between each set of stats, and spaces used to indent each stat. Try removing all tabs or unifying the indentation type using your development environment’s indentation tools or Find-and-Replace tool, perhaps?
That’s just concatenation, and it actually is formatted in a manner that functions without error. I’m sure it could have been formatted more obviously and explicitly like this:
…but that’s unnecessary. In the same way that it’s perfectly normal and acceptable to code:
*if has_food
…and unnecessary to explicitly define it as:
*if has_food = true
The concatenation operator ( & ) only requires a value following it. You can leave blank the value that precedes it, and ChoiceScript will automatically recognize that the preceding value should be the current value of the variable being set.
Now, that does mean that if you’re trying to add to the front of your variable’s value, you’ll have to call out both sides of the operator. Like so:
*if gender = "f"
*set name "Ms. " & name
*if gender = "m"
*set name "Mr. " & name
*if gender = "n"
*set name "Mx. " & name
But when adding to the back of the variable’s value? It’s fine to only specify the following side of the concatenation operator.
As for what concatenation actually does? It basically just glues two values together, side-by-side. For example:
*temp variable 4 + 4
${variable}
The above will display 8. Because it added the values together. However…
*temp variable 4 & 4
${variable}
…that will display 44. It really is just gluing the values together. Side-by-side.