# Numeric or Text?

**URL:** <https://forum.choiceofgames.com/t/numeric-or-text/172011>\
**Category:** Game Development\
**Created:** [July 25, 2025, 3:04pm UTC](https://forum.choiceofgames.com/t/numeric-or-text/172011 "2025-07-25T15:04:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Valda\_Reehux](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/valda_reehux/32/126891_2.png) [@Valda\_Reehux](https://forum.choiceofgames.com/u/Valda_Reehux)\
**Post date:** [July 25, 2025, 3:04pm UTC](https://forum.choiceofgames.com/t/numeric-or-text/172011/1 "2025-07-25T15:04:42Z")

</div>

Good day people,

so I’ve been away for some time and forgot the basics of choicescript and here is my problem:

**when exactly should I declare a variable as numeric instead of text?**

because I tried this today:  
 ![image](https://global.discourse-cdn.com/choiceofgames/original/4X/e/f/3/ef3b73b1de08d3892275c5296061de7a42026784.png)

 ![image](https://global.discourse-cdn.com/choiceofgames/original/4X/a/b/2/ab279fb5fa2a6293f2651779aa77823a23d36e06.png)  
 ![image](https://global.discourse-cdn.com/choiceofgames/original/4X/c/3/a/c3a5ecf31d848d4a8fceb63099b3a2f539aba3d2.png)  
 ![image](https://global.discourse-cdn.com/choiceofgames/original/4X/3/2/d/32d233f60e2e5c4ed635f66c7197fe7cba1ea209.png)

declared two variables as text, and they can be used in math operations just fine, so why do I need to declare a variable as numeric?

sorry for such a basic question, thank you 🫠

---

<div class="post-metadata">

**Author:** ![cup\_half\_empty](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cup_half_empty/32/273983_2.png) [@cup\_half\_empty](https://forum.choiceofgames.com/u/cup_half_empty)\
**Post date:** [July 25, 2025, 3:47pm UTC](https://forum.choiceofgames.com/t/numeric-or-text/172011/2 "2025-07-25T15:47:11Z")

</div>

Grossly speaking, everything in ChoiceScript is saved as text behind the curtain, but when you perform an arithmetic operation (adding, subtraction, multiplying, etc) it will try to convert the value into a number.

You’re right in pointing out you don’t **have to** to declare a variable as a number, but if it **is** a number, why would you declare it as a string? The only case where I use string to declare a number is for negative numbers, otherwise ChoiceScript will think I’m trying to perform a subtraction.

```js
// ChoiceScript thinks this is a subtraction
*temp var_1 -5

// Negative number
*temp var_2 "-5"

```

---

<div class="post-metadata">

**Author:** ![Nocturnal\_Stillness](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/nocturnal_stillness/32/100414_2.png) [@Nocturnal\_Stillness](https://forum.choiceofgames.com/u/Nocturnal_Stillness)\
**Post date:** [July 25, 2025, 4:58pm UTC](https://forum.choiceofgames.com/t/numeric-or-text/172011/3 "2025-07-25T16:58:04Z")

</div>

You should use

\*create var\_1 100  
\*create var\_2 50

Booleans (string variable) are more used for variables that are words or letters etc
