# Creating lists of items

**URL:** <https://forum.choiceofgames.com/t/creating-lists-of-items/9993>\
**Category:** ChoiceScript Help\
**Created:** [June 12, 2015, 5:57pm UTC](https://forum.choiceofgames.com/t/creating-lists-of-items/9993 "2015-06-12T17:57:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Polygon123](https://avatars.discourse-cdn.com/v4/letter/p/7bcc69/32.png) [@Polygon123](https://forum.choiceofgames.com/u/Polygon123)\
**Post date:** [June 12, 2015, 5:57pm UTC](https://forum.choiceofgames.com/t/creating-lists-of-items/9993/1 "2015-06-12T17:57:29Z")

</div>

I’ve been trying to make a list that will be triggered by commands in the story but each time the item is triggered in the story I receive the error message "non-existent variable ‘comma’. I don’t know how common this issue is so if you need me to post the problem code than I can do so. Also note that I used the code shown on the wiki to create the programming for the item list. Thank you for your time!

---

<div class="post-metadata">

**Author:** ![RETowers](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/retowers/32/21477_2.png) [@RETowers](https://forum.choiceofgames.com/u/RETowers)\
**Post date:** [June 12, 2015, 6:01pm UTC](https://forum.choiceofgames.com/t/creating-lists-of-items/9993/2 "2015-06-12T18:01:03Z")

</div>

The short is you need to start by \*creating the variables. Why don’t you start with my guide [here](https://forum.choiceofgames.com/t/the-beginners-guide-to-choicescript/9866), it’s a little more step by step than the official help pages.

---

<div class="post-metadata">

**Author:** ![Polygon123](https://avatars.discourse-cdn.com/v4/letter/p/7bcc69/32.png) [@Polygon123](https://forum.choiceofgames.com/u/Polygon123)\
**Post date:** [June 12, 2015, 6:10pm UTC](https://forum.choiceofgames.com/t/creating-lists-of-items/9993/3 "2015-06-12T18:10:07Z")

</div>

Yes, I have created the variables beforehand. Now that I think about it the problem might be because I have two sets of variables, one set are boolean and the other is a string variable and I want whether or not the boolean variables are true or false to affect the content of the string variable.

---

<div class="post-metadata">

**Author:** ![cvaneseltine](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cvaneseltine/32/4047_2.png) [@cvaneseltine](https://forum.choiceofgames.com/u/cvaneseltine)\
**Post date:** [June 12, 2015, 6:26pm UTC](https://forum.choiceofgames.com/t/creating-lists-of-items/9993/4 "2015-06-12T18:26:43Z")

</div>

I think it will be helpful if you post your problem code.

---

<div class="post-metadata">

**Author:** ![Polygon123](https://avatars.discourse-cdn.com/v4/letter/p/7bcc69/32.png) [@Polygon123](https://forum.choiceofgames.com/u/Polygon123)\
**Post date:** [June 12, 2015, 6:48pm UTC](https://forum.choiceofgames.com/t/creating-lists-of-items/9993/5 "2015-06-12T18:48:04Z")

</div>

Got it.

\*create notebook “empty”  
\*create book “not read”

\*create nempty true  
\*create bempty true  
\*create nread false  
\*create b\_read false  
(This is in startup)

\*label note

Notebook :

\*if (nempty)  
\*set notebook “empty”  
\*if (nread)  
\*set notebook “written in”  
\*set comma true

${notebook}

\*label bk

Book:

\*if (bempty)  
\*set book “not read”  
\*if (bread)  
\*set book “Read”  
\*set comma true  
${book}  
(This is in choicescript\_stats)

---

<div class="post-metadata">

**Author:** ![RETowers](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/retowers/32/21477_2.png) [@RETowers](https://forum.choiceofgames.com/u/RETowers)\
**Post date:** [June 12, 2015, 6:57pm UTC](https://forum.choiceofgames.com/t/creating-lists-of-items/9993/6 "2015-06-12T18:57:30Z")

</div>

You need to `*create comma false` at the start of the game.

---

<div class="post-metadata">

**Author:** ![Polygon123](https://avatars.discourse-cdn.com/v4/letter/p/7bcc69/32.png) [@Polygon123](https://forum.choiceofgames.com/u/Polygon123)\
**Post date:** [June 12, 2015, 7:03pm UTC](https://forum.choiceofgames.com/t/creating-lists-of-items/9993/7 "2015-06-12T19:03:14Z")

</div>

That worked. Wow, can’t believe that it was that simple! Thank you so much for your help, I really appreciate it!
