[Help] Stat Description Issue


#1

Hi much like many users, I am new to the ChoiceScript. After scrolling through many forums I couldn’t come across a fix for this issue so I’m posting it here.

I liked the idea from Choice of Robots how it would display a description next to wealth like so:
Wealth: 4 (Getting By)

Your Stats
    
  
*stat_chart
  percent Leadership
  percent Health
  opposed_pair Sane
    Mad
  opposed_pair Strength
    Weakness
  opposed_pair Bravery
    Cowardess
  
  text "Unknown"  Name
  text "Unknown"  Gender
  text Intelligence
  text Finesse
  text Contempt
  text Wealth Wealth : ${wealth} ${WealthTag} 
  text Renown
  text "Who?" Known as
  

Unfortunately The above code instead makes it display this:

Capturel

I just need to (re)move the additional number stat from “Wealth” that is shown.

Any help is much appreciated. Thank you in advance. :wink:


#2

I think you dont need the text bit at most bits here.

Wealth : ${wealth} ${wealthtag}

Should do


#3

Removing text comes with the error:

invalid line; this line should start with ‘percent’, ‘text’, or ‘opposed_pair’

and doing

text Wealth : {wealth} {wealthtag}

Displays this:
Capture2


#4

What does your ${wealthtag} variable do? Just that by itself, I mean.


#5

I removed the text before wealth, deindented, and put it out of the stat_chart


#6

the ${WealthTag} Variable adds the description to it. I have it written in startup as:

*create WealthTag "(Getting By)"

*if Wealth = 0
  *set WealthTag "(Poverty-Struck)"

*if Wealth < 99
  *set WealthTag "(Getting by)"
  
*if Wealth > 100
  *set WealthTag "(Well Off)"
  
*if Wealth > 750
  *set WealthTag "(Wealthy)"
  
*if Wealth > 2000
  *set WealthTag "(Ludicrously Wealthy)"
  

The variable on it’s own works fine, it’s just trying to display it in the correct place.


#7
Your Stats
    
  
*stat_chart
  percent Leadership
  percent Health
  opposed_pair Sane
    Mad
  opposed_pair Strength
    Weakness
  opposed_pair Bravery
    Cowardess
  
  text "Unknown"  Name
  text "Unknown"  Gender
  text Intelligence
  text Finesse
  text Contempt
  text Renown
  text "Who?" Known as

Wealth : ${Wealth} ${WealthTag}

This fixed it. Thankyou for the help!


#8

Maybe this will help you figure out the problem.

I put this code in a startup file and got what you see in the screenshot.

*create wealthtag "(Getting By)"
*create wealth 3

Wealth: ${wealthtag} ${wealth}

So I’m guessing that you have some code that automatically puts a colon and a number after your wealthtag.