# "startup line 74: expected choice body"

**URL:** <https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964>\
**Category:** ChoiceScript Help\
**Created:** [June 10, 2015, 3:25pm UTC](https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964 "2015-06-10T15:25:16Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![addicted](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@addicted](https://forum.choiceofgames.com/u/addicted)\
**Post date:** [June 10, 2015, 3:25pm UTC](https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964/1 "2015-06-10T15:25:16Z")

</div>

so… I have written the first chapter of my game but when playing it, I get this error message:

```
"startup line 74: expected choice body."
It's to do with this bit of script I have written:
All you know is that you're a:
*choice
  #Male
*set gender "male"
  *goto First_name_male
  #Female
*set gender "female"
  *goto_first_name_male

```

It’s the \*set lines that are causing the error but as I am pretty new to choicescript, I don’t know why.

thanks in advance for your help.

---

<div class="post-metadata">

**Author:** ![seabean](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/seabean/32/96835_2.png) [@seabean](https://forum.choiceofgames.com/u/seabean)\
**Post date:** [June 10, 2015, 3:31pm UTC](https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964/2 "2015-06-10T15:31:21Z")

</div>

Just to be sure, are you indenting properly?

```
*choice
    #Male
        *set gender "male"
        *goto First_name_male
    #Female
        *set gender "female"
        *goto_first_name_male

```

(Just so you know, you can use the \</\> button to post code properly.)

---

<div class="post-metadata">

**Author:** ![Arcania](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/arcania/32/89710_2.png) [@Arcania](https://forum.choiceofgames.com/u/Arcania)\
**Post date:** [June 10, 2015, 3:33pm UTC](https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964/3 "2015-06-10T15:33:53Z")

</div>

@Addicted do you mind putting \< pre \> \< /pre \> without all the spaces and your code between the two \>\< of the pre’s? This will allow us to properly see how your code is spaced out. As of now I would simply say you need to tab those choices.

Have you created gender in your startup page? and create a male and female for it?

Ah wait I think I see the problem, in your last line \*goto\_first\_name\_male that first underscore shouldn’t be there. Should be \*goto first\_name\_male let me know if that solved your problem.

@seabean well you’re fast \>.\>

* * *

@addicted so it should look something like this if you’re doing it properly.

```
*choice
    #Male
        *set gender "male"
        *goto First_name_male
    #Female
        *set gender "female"
        *goto first_name_male
```

* * *

If this doesn’t work make sure that your variables actually exist, including your labels.

---

<div class="post-metadata">

**Author:** ![fantom](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fantom/32/8537_2.png) [@fantom](https://forum.choiceofgames.com/u/fantom)\
**Post date:** [June 10, 2015, 3:34pm UTC](https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964/4 "2015-06-10T15:34:11Z")

</div>

I was about to ask that too. @addicted whenever you’re pasting code on here be sure to select the text you pasted and use the “preformated text” option.

---

<div class="post-metadata">

**Author:** ![seabean](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/seabean/32/96835_2.png) [@seabean](https://forum.choiceofgames.com/u/seabean)\
**Post date:** [June 10, 2015, 3:35pm UTC](https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964/5 "2015-06-10T15:35:23Z")

</div>

Lol, yep. 😛

I just noticed that. Assuming your indenting is right, getting rid of the underscore could fix the issue!

---

<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:** [June 10, 2015, 3:35pm UTC](https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964/6 "2015-06-10T15:35:35Z")

</div>

I see three possible errors:  
Indents  
Using #  
The space on the female option of the \*goto

```
All you know is that you're a:
*choice
     #Male
          *set gender "male"
          *goto First_name_male
     #Female
          *set gender "female"
          *goto First_name_male
```

---

<div class="post-metadata">

**Author:** ![addicted](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@addicted](https://forum.choiceofgames.com/u/addicted)\
**Post date:** [June 10, 2015, 4:00pm UTC](https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964/7 "2015-06-10T16:00:19Z")

</div>

yeah sorry about that. I have used indentation when writing but I didn’t know how to write it on here.  
as for the problem though… It’s saying that the problem is to do with the “\*set”. I have created male and female labels so I don’t know why it’s saying that that’s an error.  
Just to let you know, I haven’t indented the “\*set” as when I did at first, it says that the indentation shouldn’t be there; so I removed it.

---

<div class="post-metadata">

**Author:** ![FairyGodfeather](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fairygodfeather/32/16709_2.png) [@FairyGodfeather](https://forum.choiceofgames.com/u/FairyGodfeather)\
**Post date:** [June 10, 2015, 4:04pm UTC](https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964/8 "2015-06-10T16:04:01Z")

</div>

@Addicted

You need to indent the set. @Seabean has shown the proper indentation.

> [@Forum Tricks: Code Formatting and Spoiler Tags](https://forum.choiceofgames.com/t/forum-tricks-code-formatting-and-spoiler-tags/9528/1):
>
> How to format your code so it can be seen on the forum.
> 
> Paste code into window.  
> Highlight all of the code.  
> Click the preformatted text button. (It looks like \</\> and is next to the quote one and on the same bar as the other formatting and smilies choice.)  
> Click reply.
> 
> ![](https://global.discourse-cdn.com/choiceofgames/original/2X/4/42ad6b6f83fcee0cf73c37f5a6503deac46ad12f.png)

---

<div class="post-metadata">

**Author:** ![fantom](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fantom/32/8537_2.png) [@fantom](https://forum.choiceofgames.com/u/fantom)\
**Post date:** [June 10, 2015, 4:04pm UTC](https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964/9 "2015-06-10T16:04:33Z")

</div>

Well for indentation, it’s as @Arcania and @Lucid show. It always goes

```
*choice
>#male
>>*set gender "male"
>>*goto first_name_male
```

---

<div class="post-metadata">

**Author:** ![seabean](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/seabean/32/96835_2.png) [@seabean](https://forum.choiceofgames.com/u/seabean)\
**Post date:** [June 10, 2015, 4:05pm UTC](https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964/10 "2015-06-10T16:05:02Z")

</div>

Also, I’d just get rid of the capitalization in “First\_name\_male”, it can cause issues.

```
 *choice
      #Male
         *set gender "male"
         *goto first_name_male
      #Female
         *set gender "female"
         *goto first_name_female

```

The \*set command needs to be indented along with the \*goto as others have shown.

---

<div class="post-metadata">

**Author:** ![addicted](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@addicted](https://forum.choiceofgames.com/u/addicted)\
**Post date:** [June 10, 2015, 4:42pm UTC](https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964/11 "2015-06-10T16:42:07Z")

</div>

Yeah. it’s worked now. It looks like I wasn’t doing enough indentation. Thanks all for your help.

---

<div class="post-metadata">

**Author:** ![addicted](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@addicted](https://forum.choiceofgames.com/u/addicted)\
**Post date:** [June 10, 2015, 8:19pm UTC](https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964/12 "2015-06-10T20:19:00Z")

</div>

If the moderators don’t mind I would like to ask another question here. Although it is not to do with this problem, I don’t want to clog up the forum.

How when writing in choice script do you get it to put in “she, her etc” when writing about a female and “him, his etc” when talking about a male? yeah… I know this is pretty basic stuff but although I thought I had it, it turns out I haven’t.

Sorry for being a constant pest… 🙂

---

<div class="post-metadata">

**Author:** ![seabean](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/seabean/32/96835_2.png) [@seabean](https://forum.choiceofgames.com/u/seabean)\
**Post date:** [June 10, 2015, 8:30pm UTC](https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964/13 "2015-06-10T20:30:40Z")

</div>

```
*choice
    #Male
        *set gender "male"
        *set hisher "his"
        *set heshe "he"
        *set himher "him"
        *set himherself "himself"
    #Female
        *set gender "female"
        *set hisher "her"
        *set heshe "she"
        *set himher "her"
        *set himherself "herself"

```

And so on. you can name the variables whatever you like, and add more of them as well. 😄

These variables will basically work as pronouns and you’d define them in the text as such: ${heshe} can take care of ${himherself}.

If you aren’t familiar with displaying variables, take a look at this page: [http://choicescriptdev.wikia.com/wiki/Displaying\_variables](http://choicescriptdev.wikia.com/wiki/Displaying_variables)

---

<div class="post-metadata">

**Author:** ![fantom](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fantom/32/8537_2.png) [@fantom](https://forum.choiceofgames.com/u/fantom)\
**Post date:** [June 10, 2015, 8:38pm UTC](https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964/14 "2015-06-10T20:38:00Z")

</div>

We don’t mind, believe me. We’re all about helping out!

```
*create gender ""
*create his ""
*create him ""
*create he ""
*create mr ""
*create boy ""

Choose your gender

    *fake_choice
        #Man
            *set gender "man"
            *set his "his"
            *set him "him"
            *set he "he"
            *set mr "Mr"
            *set boy "boy"
        #Woman
            *set gender "woman"
            *set his "hers"
            *set him "her"
            *set he "she"
            *set mr "Ms"
            *set boy "girl"
            
    Well, ${he}'s a fine ${boy}.
```

---

<div class="post-metadata">

**Author:** ![FairyGodfeather](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fairygodfeather/32/16709_2.png) [@FairyGodfeather](https://forum.choiceofgames.com/u/FairyGodfeather)\
**Post date:** [June 10, 2015, 8:39pm UTC](https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964/15 "2015-06-10T20:39:11Z")

</div>

@Addicted I did a tutorial on this [A Basic Tutorial on Name, Relationship and Gender Variables](https://forum.choiceofgames.com/t/a-basic-tutorial-on-name-relationship-and-gender-variables/2060)

Reaperoa also explains it in his guide.

> [@The Beginners Guide to ChoiceScript](https://forum.choiceofgames.com/t/the-beginners-guide-to-choicescript/9866):
>
> So, any long time member may know that I made a ChoiceScript Guide. Well after so long and so many iterations, I’m closing in on completing it. My intentions with this guide is to create something that, no matter your level of skill or computer knowledge, it can teach you the basics of ChoiceScript. For me to consider it truly ‘done’ though, I want to make sure it includes every thing that any aspiring ChoiceScript writer may want. So if you don’t know what to do with ChoiceScript, try checking …

---

<div class="post-metadata">

**Author:** ![addicted](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@addicted](https://forum.choiceofgames.com/u/addicted)\
**Post date:** [June 11, 2015, 6:03pm UTC](https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964/16 "2015-06-11T18:03:45Z")

</div>

```
Hi there,

I have another question to ask you guys…

How do you get choicescript to only allow someone to use a particular item only if they have picked it up earlier in the game?

Here is something I have made up just for the mean time but it still includes everything that I have done in my actual game (including exact indentation).

At the start of the game:
*create item_one ""

*label demonstration_one

You walk in to a room and spot a pen lying on a table what do you do?
  #Pick it up
   *set item_one "pen"
   *goto write_letter
  #Leave the pen where it is.
   *goto write_letter

*label write_letter

You decide to write a letter. With what writing implimment do you do so?
  #pen
   *if item_one = "pen"
   You pick up the pen and start writing your letter.
*goto next_section
  #You don't have a writing implimment to write with.
   *goto next_section

And as always, I am ever greatful for the help you provide.
:smile:
```

---

<div class="post-metadata">

**Author:** ![FairyGodfeather](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fairygodfeather/32/16709_2.png) [@FairyGodfeather](https://forum.choiceofgames.com/u/FairyGodfeather)\
**Post date:** [June 11, 2015, 6:08pm UTC](https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964/17 "2015-06-11T18:08:04Z")

</div>

@Addicted Please follow the previous instructions I gave in order to properly format your code.

---

<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 11, 2015, 6:10pm UTC](https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964/18 "2015-06-11T18:10:33Z")

</div>

That’s in the advanced section of my guide. The short is:

```
*create has_pen false

*if you get the pen at some point <-- your first choice
  *set has_pen true

*choice
  *if (has_pen) #Use the pen
    You used the pen
    *finish
  #Other options.

```

Does that make sense?

(Also, you need to highlight the code before you hit the \</\> button.)

---

<div class="post-metadata">

**Author:** ![addicted](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@addicted](https://forum.choiceofgames.com/u/addicted)\
**Post date:** [June 11, 2015, 6:54pm UTC](https://forum.choiceofgames.com/t/startup-line-74-expected-choice-body/9964/19 "2015-06-11T18:54:41Z")

</div>

Yeah thanks. It works
