# Help making \*stat\_chart

**URL:** <https://forum.choiceofgames.com/t/help-making-stat-chart/13204>\
**Category:** ChoiceScript Help\
**Created:** [November 23, 2015, 4:30am UTC](https://forum.choiceofgames.com/t/help-making-stat-chart/13204 "2015-11-23T04:30:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![FranzCallaghan](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/franzcallaghan/32/7353_2.png) [@FranzCallaghan](https://forum.choiceofgames.com/u/FranzCallaghan)\
**Post date:** [November 23, 2015, 4:30am UTC](https://forum.choiceofgames.com/t/help-making-stat-chart/13204/1 "2015-11-23T04:30:45Z")

</div>

I have problems creating the stat chart.  
what I did is this  
 ![](https://global.discourse-cdn.com/choiceofgames/original/2X/6/66494822a45a017f2d390d8a31ae92ed94ef0fb0.png)  
when I check it, It always says:  
 ![](https://global.discourse-cdn.com/choiceofgames/original/2X/9/9ab32de2ba0288bda837fdf81349ec78804daa4f.png)  
on my startup I did put  
\*create charm  
\*create intelligence

It only shows “This is the stats screen!”

---

<div class="post-metadata">

**Author:** ![Left4Bed](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/left4bed/32/232425_2.png) [@Left4Bed](https://forum.choiceofgames.com/u/Left4Bed)\
**Post date:** [November 23, 2015, 4:56am UTC](https://forum.choiceofgames.com/t/help-making-stat-chart/13204/2 "2015-11-23T04:56:05Z")

</div>

I’m assuming you want it displayed as percentages? If so, you need to use:  
\*stat\_chart  
percent charm  
percent intelligence

text isn’t a valid Choicescript command as far as I’m aware.

---

<div class="post-metadata">

**Author:** ![Imon](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/imon/32/7592_2.png) [@Imon](https://forum.choiceofgames.com/u/Imon)\
**Post date:** [November 23, 2015, 4:58am UTC](https://forum.choiceofgames.com/t/help-making-stat-chart/13204/3 "2015-11-23T04:58:40Z")

</div>

Furthermore they have to numbers right? or a set text? at the moment those variables are created but not defined.

---

<div class="post-metadata">

**Author:** ![AStraali](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/astraali/32/3536_2.png) [@AStraali](https://forum.choiceofgames.com/u/AStraali)\
**Post date:** [November 23, 2015, 8:45am UTC](https://forum.choiceofgames.com/t/help-making-stat-chart/13204/4 "2015-11-23T08:45:59Z")

</div>

If you want to use text,

\*create charm 0, you need the number

\*stat\_chart  
–text charm

---

<div class="post-metadata">

**Author:** ![Havenstone](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/havenstone/32/198451_2.png) [@Havenstone](https://forum.choiceofgames.com/u/Havenstone)\
**Post date:** [November 23, 2015, 10:30am UTC](https://forum.choiceofgames.com/t/help-making-stat-chart/13204/5 "2015-11-23T10:30:27Z")

</div>

Like lmon said, you need to define the stat when you create it:

```
*create charm 0
*create charm true
*create charm "gorgeous"

```

would all work, depending on whether you want the variable to be numeric, a Boolean, or a string.

---

<div class="post-metadata">

**Author:** ![Dpwjeremy](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/dpwjeremy/32/20939_2.png) [@Dpwjeremy](https://forum.choiceofgames.com/u/Dpwjeremy)\
**Post date:** [November 23, 2015, 11:08am UTC](https://forum.choiceofgames.com/t/help-making-stat-chart/13204/6 "2015-11-23T11:08:27Z")

</div>

Ok basicly, if you want it to be displayed as a text then in the startup file would need to be:

`*create charm ""`

then in the stat\_chart

> \*stat\_chart  
> Text charm

But if you want it to be displayed as a varable or as a percent. then in the startup file would need to be:

\*create charm 0 or as any other number…

Then in the stat\_chart would need to be displayed as…

```
stat_chart
  percent charm

```

or

```
${charm} this is the amount of charm you have.

```

But you can not have a number for a text or vise versa.

---

<div class="post-metadata">

**Author:** ![Havenstone](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/havenstone/32/198451_2.png) [@Havenstone](https://forum.choiceofgames.com/u/Havenstone)\
**Post date:** [November 23, 2015, 12:07pm UTC](https://forum.choiceofgames.com/t/help-making-stat-chart/13204/7 "2015-11-23T12:07:46Z")

</div>

Correction: you _can_ display numbers as text in a stat chart.

```
*set charm 1

```

in startup and

```
*stat_chart
  text Charm

```

in the stat chart will display

Charm 1

You can also, oddly enough, display a string with “percent”:

```
*create charm "gorgeous"

```

in startup and

```
*stat_chart
  percent Charm

```

in the stat chart will display

Charm: gorgeous%

The [ChoiceScript IDE](https://dl.dropboxusercontent.com/u/7840892/CJW/choicescript/tools/IDE/main.html#) is handy for testing bits of code like this and seeing what can and can’t be done…
