# Trouble using Choicescript?

**URL:** <https://forum.choiceofgames.com/t/trouble-using-choicescript/14766>\
**Category:** ChoiceScript Help\
**Created:** [February 1, 2016, 10:06pm UTC](https://forum.choiceofgames.com/t/trouble-using-choicescript/14766 "2016-02-01T22:06:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sweetie\_nikki](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@sweetie\_nikki](https://forum.choiceofgames.com/u/sweetie_nikki)\
**Post date:** [February 1, 2016, 10:06pm UTC](https://forum.choiceofgames.com/t/trouble-using-choicescript/14766/1 "2016-02-01T22:06:19Z")

</div>

I downloaded Choicescript and followed the basic guide and still got error message after error message. The problem was not the guide, it’s the user. I spent hours trying to figure it out and failed in a flaming ball of epicness. Is there an easier way to make a Choice of… game for someone like me who is apparently extremely code challenged?

---

<div class="post-metadata">

**Author:** ![Maxmansung](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/maxmansung/32/6630_2.png) [@Maxmansung](https://forum.choiceofgames.com/u/Maxmansung)\
**Post date:** [February 1, 2016, 10:10pm UTC](https://forum.choiceofgames.com/t/trouble-using-choicescript/14766/2 "2016-02-01T22:10:49Z")

</div>

Find a coder and ask them to write an example for you? If you PM me I can offer you some pointers on your code. Otherwise there are beautiful walk through both on the COG website and by users:

> **[A Basic Tutorial](https://choicescriptdev.fandom.com/wiki/A_Basic_Tutorial)**
>
> Welcome to A Basic Tutorial, and indeed, to the wonderful (if sometimes wacky!) world of ChoiceScript Game Development. There are a number of basics concepts that are necessary to understand in learning, using and discussing ChoiceScript, and this...

> [@A ChoiceScript Tutorial](https://forum.choiceofgames.com/t/a-choicescript-tutorial/399):
>
> Okay, I’ve been sitting on this for a while now (a very long while, actually, and it’s gone through many different iterations), but, despite constant attempts, I have yet to get up and finish it (like everything else I’ve done \>.\> ) So, this post is two fold. The first (obvious) bit is to announce that I’m working on it. The second is to see (and ask) if anyone else is interested in contributing. Okay, as for what I’m actually talking about. I’m trying to draw up a tutorial for ChoiceScript. So…

> **[Introduction to ChoiceScript](https://www.choiceofgames.com/make-your-own-games/choicescript-intro/)**
>
> ChoiceScript is a simple programming language for writing multiple-choice games (MCGs) like Choice of the Dragon. Writing games with ChoiceScript is easy and fun, even for authors with no programmi…

---

<div class="post-metadata">

**Author:** ![sweetie\_nikki](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@sweetie\_nikki](https://forum.choiceofgames.com/u/sweetie_nikki)\
**Post date:** [February 1, 2016, 10:16pm UTC](https://forum.choiceofgames.com/t/trouble-using-choicescript/14766/3 "2016-02-01T22:16:05Z")

</div>

Thank you so much for the suggestion and resources sir! I am currently trying to figure this site and how to PM you. I used to think myself so tech savvy but whew! Thank you again!

---

<div class="post-metadata">

**Author:** ![Maxmansung](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/maxmansung/32/6630_2.png) [@Maxmansung](https://forum.choiceofgames.com/u/Maxmansung)\
**Post date:** [February 1, 2016, 10:19pm UTC](https://forum.choiceofgames.com/t/trouble-using-choicescript/14766/4 "2016-02-01T22:19:55Z")

</div>

Apologies, you wont be able to PM until you have been a member for a long enough period. Until then you will have to use the walkthrough’s

---

<div class="post-metadata">

**Author:** ![DavidGil](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@DavidGil](https://forum.choiceofgames.com/u/DavidGil)\
**Post date:** [February 2, 2016, 12:21pm UTC](https://forum.choiceofgames.com/t/trouble-using-choicescript/14766/5 "2016-02-02T12:21:49Z")

</div>

What exactly is the issue?

Without knowing, it’s best to start with baby steps. So, something like:

> The enemies advancing.

> \*choice

> ```
> #Attack.
> 
> ```

> ```
> You attack and they fall back.
> *goto attackers_defeated
> 
> ```

> ```
> #Defend.
> 
> You defend and they fall back. 
> *goto attackers_defeated
> 
> ```

> \*label attackers\_defeated  
> You cheer.  
> \*ending

The main thing, really, is to make sure the indents are right. One tab, or two spaces between each level, for instance. Also, I’d recommend using notepad++. It’ll help you keep track of indent levels and such.

You can also go a bit more in-depth and change the above to:

> The enemies are advancing.

> \*choice

> #Attack.

> ```
> You attack and they fall back.
> *set attackers_attacked true
> *goto attackers_defeated
> 
> ```

> #Defend.
> 
> ```
> You defend and they fall back. 
> *goto attackers_defeated
> 
> ```

> \*label attackers\_defeated  
> You cheer.  
> \*if attackers\_attacked = true  
> After your ferocious onslaught in retaliation, you know they won’t be back for a long time.  
> \*if attackers\_attacked = false  
> You hope they won’t be back for some time.  
> \*ending

(apologies about the indents being wrong for the second quote. Not sure why, but under the if statements, indent them by one level before having \*ending without any indents.)

attackers\_attacked would need to be created as a \*temp file possibly at the start of the scene though, like this:

\*temp attackers\_attacked false

If you want it to be a permanent variable/switch, you’ll need to create it in the startup file, where you’ll replace \*temp with \*create.

Also, you want the \*ending command in there because randomtest will throw up errors if there’s no ending point. So, if you’ve got a choice inserted but no text for it, simply add \*ending underneath and it should work fine (I tend to add ‘not written’ in brackets beside the choice as well).

Also, adding further choices before using a \*goto command is fine. You just need to manage the indent levels correctly.

Hope this helps and what I’ve posted here should give you a starting point without errors cropping up.

---

<div class="post-metadata">

**Author:** ![sweetie\_nikki](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@sweetie\_nikki](https://forum.choiceofgames.com/u/sweetie_nikki)\
**Post date:** [February 2, 2016, 5:35pm UTC](https://forum.choiceofgames.com/t/trouble-using-choicescript/14766/6 "2016-02-02T17:35:09Z")

</div>

Thank you very much! That really did help me a great deal and I greatly appreciate it sir! I understand a bit more how to correctly input the commands in a simple way. I was making it far too complicated. Thank you again.

---

<div class="post-metadata">

**Author:** ![DavidGil](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@DavidGil](https://forum.choiceofgames.com/u/DavidGil)\
**Post date:** [February 2, 2016, 10:20pm UTC](https://forum.choiceofgames.com/t/trouble-using-choicescript/14766/7 "2016-02-02T22:20:36Z")

</div>

You’re most welcome. Feel free to ask anything else.
