# I need help with choicescript

**URL:** <https://forum.choiceofgames.com/t/i-need-help-with-choicescript/1087>\
**Category:** ChoiceScript Help\
**Created:** [January 16, 2013, 5:31pm UTC](https://forum.choiceofgames.com/t/i-need-help-with-choicescript/1087 "2013-01-16T17:31:34Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![chasemee](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/chasemee/32/125338_2.png) [@chasemee](https://forum.choiceofgames.com/u/chasemee)\
**Post date:** [January 16, 2013, 5:31pm UTC](https://forum.choiceofgames.com/t/i-need-help-with-choicescript/1087/1 "2013-01-16T17:31:34Z")

</div>

so i,m playing around with choicescript trying to get to  
know how to do it and i,m having trouble with adding choices  
i,m trying to add choices but every time i think i got it tells  
me i need one choice. i have read everything i cant figure it out

---

<div class="post-metadata">

**Author:** ![akatsuki9344](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/akatsuki9344/32/897_2.png) [@akatsuki9344](https://forum.choiceofgames.com/u/akatsuki9344)\
**Post date:** [January 16, 2013, 5:39pm UTC](https://forum.choiceofgames.com/t/i-need-help-with-choicescript/1087/2 "2013-01-16T17:39:38Z")

</div>

here is an examle if you want a choice of  
1.kill him  
2.let him go  
you write

```
 
he attacks you, you.....
\*choice
 #kill him
   you strike him down he dies 
 #let him go
   you let him runawy
```

---

<div class="post-metadata">

**Author:** ![chasemee](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/chasemee/32/125338_2.png) [@chasemee](https://forum.choiceofgames.com/u/chasemee)\
**Post date:** [January 16, 2013, 5:51pm UTC](https://forum.choiceofgames.com/t/i-need-help-with-choicescript/1087/3 "2013-01-16T17:51:31Z")

</div>

so i tried it and it says expected option starting with #

---

<div class="post-metadata">

**Author:** ![akatsuki9344](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/akatsuki9344/32/897_2.png) [@akatsuki9344](https://forum.choiceofgames.com/u/akatsuki9344)\
**Post date:** [January 16, 2013, 6:04pm UTC](https://forum.choiceofgames.com/t/i-need-help-with-choicescript/1087/4 "2013-01-16T18:04:43Z")

</div>

did you write finish after it?

```

he attacks you, you.....

\*choice
 
#kill him

   you strike him down he dies
   \*finish 

 #let him go

   you let him runawy
   \*finish
```

---

<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:** [January 16, 2013, 6:05pm UTC](https://forum.choiceofgames.com/t/i-need-help-with-choicescript/1087/5 "2013-01-16T18:05:11Z")

</div>

you need to have a # in front of each choice

---

<div class="post-metadata">

**Author:** ![chasemee](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/chasemee/32/125338_2.png) [@chasemee](https://forum.choiceofgames.com/u/chasemee)\
**Post date:** [January 16, 2013, 6:12pm UTC](https://forum.choiceofgames.com/t/i-need-help-with-choicescript/1087/6 "2013-01-16T18:12:17Z")

</div>

i have a # in front and it still says the same thing

---

<div class="post-metadata">

**Author:** ![Lucid](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/lucid/32/39775_2.png) [@Lucid](https://forum.choiceofgames.com/u/Lucid)\
**Post date:** [January 16, 2013, 6:13pm UTC](https://forum.choiceofgames.com/t/i-need-help-with-choicescript/1087/7 "2013-01-16T18:13:30Z")

</div>

A \*finish, or at least a \*goto is needed to end each choice, but I suspect it’s the spacing.

\*choice  
…#kill him  
…you strike him down he dies  
…\*finish  
…#let him go  
…you let him runawy  
…\*finish

It’s hard to see tabs here. But, I suspect it’s this. Make sure you have a tab before the # in the choice. And then two tabs to the result of that choice.

---

<div class="post-metadata">

**Author:** ![chasemee](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/chasemee/32/125338_2.png) [@chasemee](https://forum.choiceofgames.com/u/chasemee)\
**Post date:** [January 16, 2013, 6:45pm UTC](https://forum.choiceofgames.com/t/i-need-help-with-choicescript/1087/8 "2013-01-16T18:45:21Z")

</div>

@lucid it worked thank you

---

<div class="post-metadata">

**Author:** ![akatsuki9344](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/akatsuki9344/32/897_2.png) [@akatsuki9344](https://forum.choiceofgames.com/u/akatsuki9344)\
**Post date:** [January 16, 2013, 6:49pm UTC](https://forum.choiceofgames.com/t/i-need-help-with-choicescript/1087/9 "2013-01-16T18:49:00Z")

</div>

oh you prabaly forgot the indents…

---

<div class="post-metadata">

**Author:** ![chasemee](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/chasemee/32/125338_2.png) [@chasemee](https://forum.choiceofgames.com/u/chasemee)\
**Post date:** [January 16, 2013, 7:42pm UTC](https://forum.choiceofgames.com/t/i-need-help-with-choicescript/1087/10 "2013-01-16T19:42:18Z")

</div>

what is the coding for a name. like whhat is your name

---

<div class="post-metadata">

**Author:** ![TIYF](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/tiyf/32/633_2.png) [@TIYF](https://forum.choiceofgames.com/u/TIYF)\
**Post date:** [January 16, 2013, 7:58pm UTC](https://forum.choiceofgames.com/t/i-need-help-with-choicescript/1087/11 "2013-01-16T19:58:48Z")

</div>

If you want to add a name choice, you could do this for example…

\*choice  
-#Make a name (or whatever you want the choice to say)  
–\*input\_text name  
–\*finish or any other piece of text you’ll want to put, ex. ${name} is a good name!

The purpose for \*input\_text is to allow the user to place their own value for a variable.  
Therefore, the ‘name’ part is the actual name of the variable, however you can name your variable whatever you would like of course. EDIT:( example: i name my variable pizza, I can do  
\*choice  
-#Which type of pizza do you like  
–\*input\_text pizza  
)  
Of course the variable has to be declared either in the mygame.js or previously in the word document.  
\*create pizza  
\*set pizza “None”

After the user places what they want in the text box the variable stated after the code, in this case “name”, picks up that value. The same can be said for the command to input a number.

---

<div class="post-metadata">

**Author:** ![chasemee](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/chasemee/32/125338_2.png) [@chasemee](https://forum.choiceofgames.com/u/chasemee)\
**Post date:** [January 16, 2013, 8:15pm UTC](https://forum.choiceofgames.com/t/i-need-help-with-choicescript/1087/12 "2013-01-16T20:15:17Z")

</div>

i wish there was a youtube video for all this #-O

---

<div class="post-metadata">

**Author:** ![TIYF](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/tiyf/32/633_2.png) [@TIYF](https://forum.choiceofgames.com/u/TIYF)\
**Post date:** [January 16, 2013, 9:06pm UTC](https://forum.choiceofgames.com/t/i-need-help-with-choicescript/1087/13 "2013-01-16T21:06:42Z")

</div>

Now I kinda wanna make a tut on choice script via youtube, maybe get more people interested in it as well

---

<div class="post-metadata">

**Author:** ![akatsuki9344](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/akatsuki9344/32/897_2.png) [@akatsuki9344](https://forum.choiceofgames.com/u/akatsuki9344)\
**Post date:** [January 16, 2013, 9:09pm UTC](https://forum.choiceofgames.com/t/i-need-help-with-choicescript/1087/14 "2013-01-16T21:09:22Z")

</div>

yeah that’d be great for the new comers, you will be doing a big favor to the whole cog community

---

<div class="post-metadata">

**Author:** ![chasemee](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/chasemee/32/125338_2.png) [@chasemee](https://forum.choiceofgames.com/u/chasemee)\
**Post date:** [January 16, 2013, 9:54pm UTC](https://forum.choiceofgames.com/t/i-need-help-with-choicescript/1087/15 "2013-01-16T21:54:21Z")

</div>

Yeah you will help alot of people like me lol
