# Need Help Declaring Variables

**URL:** <https://forum.choiceofgames.com/t/need-help-declaring-variables/1409>\
**Category:** ChoiceScript Help\
**Created:** [May 30, 2013, 10:23pm UTC](https://forum.choiceofgames.com/t/need-help-declaring-variables/1409 "2013-05-30T22:23:44Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![hbloodline](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/hbloodline/32/198542_2.png) [@hbloodline](https://forum.choiceofgames.com/u/hbloodline)\
**Post date:** [May 30, 2013, 10:23pm UTC](https://forum.choiceofgames.com/t/need-help-declaring-variables/1409/1 "2013-05-30T22:23:44Z")

</div>

Hello, i am new and was just getting use to the old CS but then i decided to download the newer version and now i need help declaring variables.

Before we had to declare it in mygame.js but now i heard its different.

So how do i declare variables?

For me i need to declare the players name, pets name, and some skills

For skills in the stats screen i need to declare Evil and Kindness.

Can anyone help me?

---

<div class="post-metadata">

**Author:** ![ADNox](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/adnox/32/1115_2.png) [@ADNox](https://forum.choiceofgames.com/u/ADNox)\
**Post date:** [May 30, 2013, 10:25pm UTC](https://forum.choiceofgames.com/t/need-help-declaring-variables/1409/2 "2013-05-30T22:25:36Z")

</div>

You can still use the old version. I am with no issues.

---

<div class="post-metadata">

**Author:** ![hbloodline](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/hbloodline/32/198542_2.png) [@hbloodline](https://forum.choiceofgames.com/u/hbloodline)\
**Post date:** [May 30, 2013, 10:28pm UTC](https://forum.choiceofgames.com/t/need-help-declaring-variables/1409/3 "2013-05-30T22:28:29Z")

</div>

@ADNox

Really? i seem to be having trouble with it.

How do we do it in the new version?

---

<div class="post-metadata">

**Author:** ![ADNox](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/adnox/32/1115_2.png) [@ADNox](https://forum.choiceofgames.com/u/ADNox)\
**Post date:** [May 30, 2013, 10:32pm UTC](https://forum.choiceofgames.com/t/need-help-declaring-variables/1409/4 "2013-05-30T22:32:10Z")

</div>

No idea. I just list the variables in mygame.js. I have about fifty variables so far, mostly hidden ones to track MC decisions, and no problem. Then again, I don’t have the latest version of CS. I have the one right before it.

---

<div class="post-metadata">

**Author:** ![hbloodline](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/hbloodline/32/198542_2.png) [@hbloodline](https://forum.choiceofgames.com/u/hbloodline)\
**Post date:** [May 30, 2013, 10:35pm UTC](https://forum.choiceofgames.com/t/need-help-declaring-variables/1409/5 "2013-05-30T22:35:22Z")

</div>

hahah yeah i had the version just before the new one and got used to it… then updated it… and yeah now i am lost hahaha…

---

<div class="post-metadata">

**Author:** ![hbloodline](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/hbloodline/32/198542_2.png) [@hbloodline](https://forum.choiceofgames.com/u/hbloodline)\
**Post date:** [May 30, 2013, 10:40pm UTC](https://forum.choiceofgames.com/t/need-help-declaring-variables/1409/6 "2013-05-30T22:40:22Z")

</div>

how did you do it in mygame.js again? i think i will try declare it in there and see if it works

---

<div class="post-metadata">

**Author:** ![ADNox](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/adnox/32/1115_2.png) [@ADNox](https://forum.choiceofgames.com/u/ADNox)\
**Post date:** [May 30, 2013, 10:46pm UTC](https://forum.choiceofgames.com/t/need-help-declaring-variables/1409/7 "2013-05-30T22:46:45Z")

</div>

Check the mygame.js section of the Wiki. It’s for that version.

---

<div class="post-metadata">

**Author:** ![hbloodline](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/hbloodline/32/198542_2.png) [@hbloodline](https://forum.choiceofgames.com/u/hbloodline)\
**Post date:** [May 30, 2013, 10:51pm UTC](https://forum.choiceofgames.com/t/need-help-declaring-variables/1409/8 "2013-05-30T22:51:33Z")

</div>

ok, thanks 🙂 if anyone knows how to do it in the newer version, please let me know 🙂 thanks

---

<div class="post-metadata">

**Author:** ![Caddmuss](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/caddmuss/32/424_2.png) [@Caddmuss](https://forum.choiceofgames.com/u/Caddmuss)\
**Post date:** [May 31, 2013, 12:03am UTC](https://forum.choiceofgames.com/t/need-help-declaring-variables/1409/9 "2013-05-31T00:03:18Z")

</div>

Declaring variables in the latest update is intended to be done in startup.txt, though I believe you could still do it in mygame.js.

In theory - I haven’t really switched over yet either - it should look like this.

startup.txt

```

*create varnum 123
*create varstrin "One Hundred Twenty-Three"
*create varboo false

```

and having just noticing what variables you wanted:

```

*create name "J. Doe"
*create pet "Bingo"
*create moral 50

```

BASICALLY, the new version consolidates \*create, which has been undeprecated, and \*set by having you declare a value when you create a variable.

---

<div class="post-metadata">

**Author:** ![lordirishdas](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/lordirishdas/32/381_2.png) [@lordirishdas](https://forum.choiceofgames.com/u/lordirishdas)\
**Post date:** [May 31, 2013, 12:12am UTC](https://forum.choiceofgames.com/t/need-help-declaring-variables/1409/10 "2013-05-31T00:12:43Z")

</div>

I switched to the latest. Still use mygame.js to declair my variables. I did have a problem at first. I started building my list of variables as I normally would, but they did not seem to work. That was until I realized that the ]} had to be moved down and all my variables placed inside of it. Then no problems. Lol

---

<div class="post-metadata">

**Author:** ![hbloodline](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/hbloodline/32/198542_2.png) [@hbloodline](https://forum.choiceofgames.com/u/hbloodline)\
**Post date:** [May 31, 2013, 1:23am UTC](https://forum.choiceofgames.com/t/need-help-declaring-variables/1409/11 "2013-05-31T01:23:42Z")

</div>

Ok lol 🙂 it has been fixed 🙂 thanks guys

---

<div class="post-metadata">

**Author:** ![ADNox](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/adnox/32/1115_2.png) [@ADNox](https://forum.choiceofgames.com/u/ADNox)\
**Post date:** [May 31, 2013, 1:32am UTC](https://forum.choiceofgames.com/t/need-help-declaring-variables/1409/12 "2013-05-31T01:32:19Z")

</div>

That was the issue?

---

<div class="post-metadata">

**Author:** ![hbloodline](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/hbloodline/32/198542_2.png) [@hbloodline](https://forum.choiceofgames.com/u/hbloodline)\
**Post date:** [May 31, 2013, 2:37am UTC](https://forum.choiceofgames.com/t/need-help-declaring-variables/1409/13 "2013-05-31T02:37:02Z")

</div>

oh no, i fixed it by just doing it with mygame.js file… Since i did it, i dont need not need assistance right now… 🙂 thanks 🙂
