# I don't understand what I'm doing wrong

**URL:** <https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607>\
**Category:** ChoiceScript Help\
**Created:** [January 3, 2015, 1:49am UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607 "2015-01-03T01:49:59Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andy](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Andy](https://forum.choiceofgames.com/u/Andy)\
**Post date:** [January 3, 2015, 1:49am UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607/1 "2015-01-03T01:49:59Z")

</div>

[code]  
\*title Choice of the Spaceship Captain  
\*author Andy  
\*scene\_list  
startup

```
*create Hull 0
*create Crew 0
*create Speed 0
*create Weapons 0
*create Happiness 0
*create name "name"
*create spaceship "spacename"
*create gender "unknown"

*label start
You wake up on a desk with your computer monitor still on. You spent all of last night studying for the academy finals to finally become a captain of a spaceship! What's your name?
*label typename
*input_text name
Is ${name} correct?
*choice
	#Yes!
		Okay let's move on to your gender.
		*goto gender
	#Nope, typo.
		retype it..
		*goto typename
Are you a boy or a girl?
*label gender
	#I'm a boy!
		Ok, we can continue... after I get a bit of backstory.
		*goto backstory
	#I'm a girl!
		Ok, we can continue... after I get a bit of backstory.
		*goto backstory
*label Backstory
[/code]

Error message says "startup line 29: increasing indent not allowed, expected 0 was 1"
halp.
```

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [January 3, 2015, 1:53am UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607/2 "2015-01-03T01:53:35Z")

</div>

Well you don’t even have 29 lines of code there. Please can you post it all, sometimes errors can be carried through. Also use `[code]paste code here`[/code] markup.

---

<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:** [January 3, 2015, 1:54am UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607/3 "2015-01-03T01:54:48Z")

</div>

I actually just fixed it so your indents would show but you seem to have fixed it back. In order to get indents to show highlight all of your code, then click the button that says “preformatted text” (on the same bar as the smiley, quote button, link, bold, etc is).

---

<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:** [January 3, 2015, 1:59am UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607/4 "2015-01-03T01:59:26Z")

</div>

Okay, firstly you should do

```
*label gender

Are you a boy or a girl?

*choice
	#I'm a boy!
		Ok, we can continue... after I get a bit of backstory.
		*goto backstory
	#I'm a girl!
		Ok, we can continue... after I get a bit of backstory.
		*goto backstory
```

---

<div class="post-metadata">

**Author:** ![Andy](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Andy](https://forum.choiceofgames.com/u/Andy)\
**Post date:** [January 3, 2015, 2:01am UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607/5 "2015-01-03T02:01:43Z")

</div>

It worked! Sorry for dumb mistakes, I’ve redone that entire code 4 times and I couldn’t get it right. If I have anymore questions should I just edit this one to my question?

---

<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:** [January 3, 2015, 2:03am UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607/6 "2015-01-03T02:03:05Z")

</div>

If you’ve more questions post them here, make separate posts if you like and we’ll answer them.

---

<div class="post-metadata">

**Author:** ![Andy](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Andy](https://forum.choiceofgames.com/u/Andy)\
**Post date:** [January 3, 2015, 2:03am UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607/7 "2015-01-03T02:03:27Z")

</div>

ok thanks, this code gets really confusing sometimes.

---

<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:** [January 3, 2015, 2:05am UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607/8 "2015-01-03T02:05:08Z")

</div>

It does. I found it extremely difficult to start with. Eventually it clicked though.

Incidentally I wrote [A Basic Tutorial on Name, Relationship and Gender Variables](https://forum.choiceofgames.com/t/a-basic-tutorial-on-name-relationship-and-gender-variables/2060) to try and help with understanding basic startup things.

---

<div class="post-metadata">

**Author:** ![Andy](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Andy](https://forum.choiceofgames.com/u/Andy)\
**Post date:** [January 3, 2015, 3:07am UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607/9 "2015-01-03T03:07:38Z")

</div>

New question, why isn’t this working

```
*label gender

Are you a boy or a girl?

*choice
	#I'm a boy!
		Ok, we can continue... after I get a bit of backstory.
		*goto backstory
		*set gender "male"
	#I'm a girl!
		Ok, we can continue... after I get a bit of backstory.
		*goto backstory
		*set gender "female"
```

After this is done, gender isn’t set to “male”

---

<div class="post-metadata">

**Author:** ![CJW](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cjw/32/111787_2.png) [@CJW](https://forum.choiceofgames.com/u/CJW)\
**Post date:** [January 3, 2015, 3:23am UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607/10 "2015-01-03T03:23:19Z")

</div>

You might want to try putting \*set before you \*goto somewhere else.

---

<div class="post-metadata">

**Author:** ![Andy](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Andy](https://forum.choiceofgames.com/u/Andy)\
**Post date:** [January 3, 2015, 3:29am UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607/11 "2015-01-03T03:29:43Z")

</div>

haha ok thanks XD

Post must be 20 letters so I’m writing this useless text here to take up space.

---

<div class="post-metadata">

**Author:** ![dfabulich](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/dfabulich/32/198373_2.png) [@dfabulich](https://forum.choiceofgames.com/u/dfabulich)\
**Post date:** [January 3, 2015, 4:32am UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607/12 "2015-01-03T04:32:47Z")

</div>

Since you just wanted to express your gratitude, next time, instead of typing “useless text,” you could click the “heart” icon to Like the post.

---

<div class="post-metadata">

**Author:** ![Andy](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Andy](https://forum.choiceofgames.com/u/Andy)\
**Post date:** [January 3, 2015, 4:37am UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607/13 "2015-01-03T04:37:36Z")

</div>

Andd… need help again

```
You wake up on a desk with your computer monitor still on. You spent all of last night studying for the academy finals to finally become a captain of a spaceship! Your pocket buzzes from your phone. You pull your phone out of your pocket and see your friend's name on the phone's screen he's calling you.
Who is your best friend?

*Choice
	*if (clone) #blah blah blah
```

error message says “line 7: Expected choice body”  
dunno what I’m doing wrong

---

<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:** [January 3, 2015, 4:48am UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607/14 "2015-01-03T04:48:45Z")

</div>

Have a read of everything on the webpage. [https://www.choiceofgames.com/make-your-own-games/choicescript-intro/](https://www.choiceofgames.com/make-your-own-games/choicescript-intro/)

Then have a look at the wiki. [choicescriptdev.wikia.com](http://choicescriptdev.wikia.com)

And if you’re looking for help can you please paste everything.

---

<div class="post-metadata">

**Author:** ![Andy](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Andy](https://forum.choiceofgames.com/u/Andy)\
**Post date:** [January 3, 2015, 5:21am UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607/15 "2015-01-03T05:21:26Z")

</div>

that is everything it’s my second scene.  
I’m trying to make it so if clone=true i can see that option and select 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:** [January 3, 2015, 7:04am UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607/16 "2015-01-03T07:04:44Z")

</div>

You need to have text underneath, or a goto or something.

Use the IDE @CJW made. [https://dl.dropboxusercontent.com/u/7840892/CJW/choicescript/tools/IDE/main.html](https://dl.dropboxusercontent.com/u/7840892/CJW/choicescript/tools/IDE/main.html) Put text into it, fiddle about with it until things work.

---

<div class="post-metadata">

**Author:** ![Eternalfire](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/eternalfire/32/2723_2.png) [@Eternalfire](https://forum.choiceofgames.com/u/Eternalfire)\
**Post date:** [January 5, 2015, 11:58pm UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607/17 "2015-01-05T23:58:28Z")

</div>

Alright, i am sorry for using your discussion but it seems that your problem is solved and i do not wish to create a new post for such a small problem.

AH is it possible to somehow have spaces in a stat:

For example:

> \*create friendship with Decimus

---

<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:** [January 6, 2015, 6:03am UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607/18 "2015-01-06T06:03:32Z")

</div>

I think you need to use underscores so friendship\_with\_decimus

---

<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:** [January 6, 2015, 9:14am UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607/19 "2015-01-06T09:14:33Z")

</div>

When you create a stat, you have to give it a value, so you’d do something like this:

```
*create decimus_friendship ""

```

and in the stat screen you would type it in like this

```
*stat_chart
    text decimus_friendship Friendship with Decimus

```

which would display as “Friendship with Decimus:”

---

<div class="post-metadata">

**Author:** ![Eternalfire](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/eternalfire/32/2723_2.png) [@Eternalfire](https://forum.choiceofgames.com/u/Eternalfire)\
**Post date:** [January 6, 2015, 8:52pm UTC](https://forum.choiceofgames.com/t/i-dont-understand-what-im-doing-wrong/6607/20 "2015-01-06T20:52:24Z")

</div>

Oh, i thought that would have made the underscores appear on screen as well, guess i was wrong. Thanks guys.
