# Falling out of choice

**URL:** <https://forum.choiceofgames.com/t/falling-out-of-choice/11528>\
**Category:** ChoiceScript Help\
**Created:** [August 23, 2015, 3:30pm UTC](https://forum.choiceofgames.com/t/falling-out-of-choice/11528 "2015-08-23T15:30:10Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yuvalbab](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/yuvalbab/32/16784_2.png) [@Yuvalbab](https://forum.choiceofgames.com/u/Yuvalbab)\
**Post date:** [August 23, 2015, 3:30pm UTC](https://forum.choiceofgames.com/t/falling-out-of-choice/11528/1 "2015-08-23T15:30:10Z")

</div>

Hey everybody,

I created a simple name and gender selection, and when I autotest it tells me that its ilegal to fall out of choice statment. I know what that means, but I dont see where do I fall out of one. Thanks

\*choice  
\_\_\_\_\_ #No.  
\_\_\_\_\_\_\_\*if (gendertext = “Male”)  
\_\_\_\_\_\_\_\_\*goto namechoosingmale  
\_\_\_\_\_\_ \*if (gendertext = “Female”)  
\_\_\_\_\_\_\_\_\*goto namechoosingfemale  
\_\_\_\_\_ #Yes.  
\_\_\_\_\_\_\_\_ \*page\_break  
\_\_\_\_\_\_\_\_\*goto after\_name

---

<div class="post-metadata">

**Author:** ![Cecilia\_Rosewood](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cecilia_rosewood/32/253835_2.png) [@Cecilia\_Rosewood](https://forum.choiceofgames.com/u/Cecilia_Rosewood)\
**Post date:** [August 23, 2015, 3:54pm UTC](https://forum.choiceofgames.com/t/falling-out-of-choice/11528/2 "2015-08-23T15:54:37Z")

</div>

It sounds like it’s just an indentation issue, but with just this I can’t be sure. It’d help if you posted the actual code here. (You can make it show up with the proper indentation by selecting the code and clicking the Preformatted text button. It looks like \</\> )

---

<div class="post-metadata">

**Author:** ![Lordirish](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/lordirish/32/238051_2.png) [@Lordirish](https://forum.choiceofgames.com/u/Lordirish)\
**Post date:** [August 23, 2015, 3:54pm UTC](https://forum.choiceofgames.com/t/falling-out-of-choice/11528/3 "2015-08-23T15:54:39Z")

</div>

Taking a look I am not seeing the problem, but I often find in my code it is the choice beforehand that I forgot to place a finish or goto.

---

<div class="post-metadata">

**Author:** ![Yuvalbab](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/yuvalbab/32/16784_2.png) [@Yuvalbab](https://forum.choiceofgames.com/u/Yuvalbab)\
**Post date:** [August 23, 2015, 3:58pm UTC](https://forum.choiceofgames.com/t/falling-out-of-choice/11528/4 "2015-08-23T15:58:35Z")

</div>

now I tested it manually and its really weird, becuse the game seems to be working fine, yet the autotest won’t.

---

<div class="post-metadata">

**Author:** ![Lordirish](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/lordirish/32/238051_2.png) [@Lordirish](https://forum.choiceofgames.com/u/Lordirish)\
**Post date:** [August 23, 2015, 4:00pm UTC](https://forum.choiceofgames.com/t/falling-out-of-choice/11528/5 "2015-08-23T16:00:13Z")

</div>

Can you past the whole code?

---

<div class="post-metadata">

**Author:** ![Yuvalbab](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/yuvalbab/32/16784_2.png) [@Yuvalbab](https://forum.choiceofgames.com/u/Yuvalbab)\
**Post date:** [August 23, 2015, 4:01pm UTC](https://forum.choiceofgames.com/t/falling-out-of-choice/11528/6 "2015-08-23T16:01:16Z")

</div>

```
*label name_is_true
Your name is ${first_Name} ${last_name}, Is that true?

*choice
     #No.
      *if (gender_text = "Male")
       *goto name_choosing_male
      *if (gender_text = "Female")
       *goto name_choosing_female
     #Yes.
       *page_break
       *goto after_name

*label after_name
*achieve character_created
```

---

<div class="post-metadata">

**Author:** ![Lordirish](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/lordirish/32/238051_2.png) [@Lordirish](https://forum.choiceofgames.com/u/Lordirish)\
**Post date:** [August 23, 2015, 4:07pm UTC](https://forum.choiceofgames.com/t/falling-out-of-choice/11528/7 "2015-08-23T16:07:10Z")

</div>

I do to see a problem I would think the error is coming before hand. This is my guess with out looking at the complete code. But I am not by any means a pro here, maybe someone else with more skills can point you in the right direction.

---

<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:** [August 23, 2015, 4:07pm UTC](https://forum.choiceofgames.com/t/falling-out-of-choice/11528/8 "2015-08-23T16:07:54Z")

</div>

This is a standard quicktest fake bug. [https://www.choiceofgames.com/make-your-own-games/testing-choicescript-games-automatically/#fakes](https://www.choiceofgames.com/make-your-own-games/testing-choicescript-games-automatically/#fakes)

Yours is almost exactly “Example 3” from that section, the “Gender Bug.”

---

<div class="post-metadata">

**Author:** ![Yuvalbab](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/yuvalbab/32/16784_2.png) [@Yuvalbab](https://forum.choiceofgames.com/u/Yuvalbab)\
**Post date:** [August 23, 2015, 4:12pm UTC](https://forum.choiceofgames.com/t/falling-out-of-choice/11528/9 "2015-08-23T16:12:51Z")

</div>

@dfabulich so how do I fix that using the \*bug command?

---

<div class="post-metadata">

**Author:** ![Lordirish](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/lordirish/32/238051_2.png) [@Lordirish](https://forum.choiceofgames.com/u/Lordirish)\
**Post date:** [August 23, 2015, 4:16pm UTC](https://forum.choiceofgames.com/t/falling-out-of-choice/11528/10 "2015-08-23T16:16:44Z")

</div>

Again without seeing the full code sounds like you need to ensure gender is selected before you reach this choice.

---

<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:** [August 23, 2015, 4:17pm UTC](https://forum.choiceofgames.com/t/falling-out-of-choice/11528/11 "2015-08-23T16:17:16Z")

</div>

The best way to fix it is with `*else`.

```
*choice
     #No.
      *if (gender_text = "Male")
       *goto name_choosing_male
      *else
       *goto name_choosing_female
     #Yes.
       *page_break
       *goto after_name

*label after_name
*achieve character_created

```

But, if you really insist on using `*bug`, you can do it like this:

```
*label name_is_true
Your name is ${first_Name} ${last_name}, Is that true?

*choice
     #No.
      *if (gender_text = "Male")
       *goto name_choosing_male
      *if (gender_text = "Female")
       *goto name_choosing_female
      *bug
     #Yes.
       *page_break
       *goto after_name

*label after_name
*achieve character_created
```

---

<div class="post-metadata">

**Author:** ![Yuvalbab](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/yuvalbab/32/16784_2.png) [@Yuvalbab](https://forum.choiceofgames.com/u/Yuvalbab)\
**Post date:** [August 23, 2015, 4:17pm UTC](https://forum.choiceofgames.com/t/falling-out-of-choice/11528/12 "2015-08-23T16:17:50Z")

</div>

thank you very much!
