Help with an expression error


#1

So, I wanted to make a stat that would be visible when reaching a certain point in the story. I created a variable called “war” and set it to false. Then, I modified the choicescript_stats file. I used the *if (variable true) command and then if that variable was set to true a “warfavor” bar would show up. However, this error shows up.
"choicescript_stats line 106: Invalid expression at char 8, expected OPERATOR, was: VAR [true]"


Any help would be appreciated, thanks!


#2

Does the stats chart work without the *if war true?


#3

Yes, I am dumb…
Your comment helped me a lot.
I had used the command “stats_chart” instead of “stat_chart”.
Thanks man. Also I’m dumb…I know.


#4

Well, actually, it works without the if command, tried it again, with the if command, it doesn’t work.
);


#5

Try some variations like *if war = true
Or if that doesn’t work, make war a type of variable that holds numbers.
Then you can set it to 0 for false or 1 for true
Then you can check it by doing *if war = 1
Maybe


#6

*if war = true worked.
Thank you a lot!
Yeah, I think it works. Basically the “warfavor” doesn’t show up unless one has the “war” variable set to true.
Anyways, why am I rambling…
Thank you a lot, I’d never figure this out on my own.
:smiley:


#7

It should also work with just *if war, since this is already true.


#8

Will keep that in mind!
:smiley: