"Non-existent" variables

Apologies if this has already been addressed elsewhere! I couldn’t seem to find anything myself.

So, according to the ChoiceScriptDev wiki, after placing a variable in choicescript_stats.txt, anything following that variable will “becomes the new wording for the chart”. To use their example:


text name

percent intelligence Cleverness

percent wisdom

will have the “intelligence” stat displayed as “Cleverness” in the stat screen.

It seems like a handy trick: variables can be as short as you like, increasing the speed at which you can type up a scene. However, when I tried to do it for my game:


text Name

opposed_pair exhibit Exhibitionism

opposed_pair faction Cebos

text Renown

an error message popped up. Specifically: “line 8: Non-existent variable ‘faction cebos’”.

From what I understand, this shouldn’t happen. In fact, quite the opposite: “faction” should be the only thing counted as part of the variable.

In trying to identify the issue, I copy/pasted the example above (and made sure to update mygame.js, as well as adjust the indentation) into choicescripts_stats.txt, and I got yet another error: “line 5: Non-existent variable ‘intelligence’”

I’m really not sure what the problem is. Any help toward this end would be appreciated!

I think the variable should be on a different line than the opposed pair labels. So, try…

opposed_pair faction

Good news: it worked for the faction stat!

Bad news: it’s saying “exhibit” is non-existent.

Here’s what my screens look like (relevant bits isolated):


stats = {

	name: "name"

	,exhibit: 50

...[other variables]...




	text Name

	opposed_pair exhibit

@JimD: Thank you very much for your assistance, as well as prompting me to figure out how to do code boxes. /bows

I recommend not using mygame for variables. At the top of startup.txt, use *create

*create name "name "
*create exhibition 50

All right, I’ll try that. Thank you.