# Having trouble spotting the bug

**URL:** <https://forum.choiceofgames.com/t/having-trouble-spotting-the-bug/43192>\
**Category:** ChoiceScript Help\
**Created:** [August 28, 2018, 9:56pm UTC](https://forum.choiceofgames.com/t/having-trouble-spotting-the-bug/43192 "2018-08-28T21:56:22Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![AChubbyBlackCat](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/achubbyblackcat/32/242883_2.png) [@AChubbyBlackCat](https://forum.choiceofgames.com/u/AChubbyBlackCat)\
**Post date:** [August 28, 2018, 9:56pm UTC](https://forum.choiceofgames.com/t/having-trouble-spotting-the-bug/43192/1 "2018-08-28T21:56:22Z")

</div>

Can someone help me spot the bug? I’ve included a screenshot for below of the error message and the coding involved. For the last half hour, I’ve been tinkering with what could be wrong and I’m drawing a blank. If you could help, that’d be much appreciated! 😃

 ![51%20PM](https://global.discourse-cdn.com/choiceofgames/original/3X/2/d/2d33f3f58295efd3f90bb49cef6e4dc1ef06cdde.png)

---

<div class="post-metadata">

**Author:** ![Hex](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/hex/32/98250_2.png) [@Hex](https://forum.choiceofgames.com/u/Hex)\
**Post date:** [August 28, 2018, 10:02pm UTC](https://forum.choiceofgames.com/t/having-trouble-spotting-the-bug/43192/2 "2018-08-28T22:02:19Z")

</div>

From the look of it, and this is only a guess. But it looks like an indentation issue.

The other possibility is that if you haven’t made those labels yet, it doesn’t recognize having anywhere to go. If you do, triple check to make sure they are spelled exactly right because that has happened to me before without noticing.

---

<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:** [August 28, 2018, 10:11pm UTC](https://forum.choiceofgames.com/t/having-trouble-spotting-the-bug/43192/3 "2018-08-28T22:11:53Z")

</div>

Could be an indentation issue as Frosty mentions. Or if the “Comprehension and Analysis Questions” choice is part of a parent choice (and not mis-indented), then you’ll need a goto above that line.

---

<div class="post-metadata">

**Author:** ![AChubbyBlackCat](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/achubbyblackcat/32/242883_2.png) [@AChubbyBlackCat](https://forum.choiceofgames.com/u/AChubbyBlackCat)\
**Post date:** [August 28, 2018, 10:20pm UTC](https://forum.choiceofgames.com/t/having-trouble-spotting-the-bug/43192/4 "2018-08-28T22:20:25Z")

</div>

It’s probably indentation, since I’ve double checked and rechecked the labels and their respective scene names for spelling errors.

Any ideas where the indentation issue might be? Here’s another screenshot for reference since the previous is a little smushed.

 ![45%20PM](https://global.discourse-cdn.com/choiceofgames/original/3X/5/e/5e1059af2f5b887c718f812fbd903b531658e043.png)

---

<div class="post-metadata">

**Author:** ![MeltingPenguins](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/meltingpenguins/32/255855_2.png) [@MeltingPenguins](https://forum.choiceofgames.com/u/MeltingPenguins)\
**Post date:** [August 28, 2018, 10:22pm UTC](https://forum.choiceofgames.com/t/having-trouble-spotting-the-bug/43192/5 "2018-08-28T22:22:23Z")

</div>

Wasn’t there a way in cside to ‘show hidden’ aka display indentation as dots (I know that function saved my tons of trouble in scrivener)

---

<div class="post-metadata">

**Author:** ![Hex](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/hex/32/98250_2.png) [@Hex](https://forum.choiceofgames.com/u/Hex)\
**Post date:** [August 28, 2018, 10:27pm UTC](https://forum.choiceofgames.com/t/having-trouble-spotting-the-bug/43192/6 "2018-08-28T22:27:00Z")

</div>

From the way it looks, try getting that choice on the same line where the other # are. It looks like that isn’t far enough indented. The rest are double tabbed but that one is only one spaced. Be sure all the stuff that follows after is on the proper lines as well(Indented after) So it would be 2 for a choice and three for the \*set stuff

 ![Screenshot%20(55)](https://global.discourse-cdn.com/choiceofgames/original/3X/3/a/3a31ca2dd0b4384224945128543646dfac160a80.png)

Not sure if that helps, but you can see the lines that needed to be indented at least a little.

---

<div class="post-metadata">

**Author:** ![Vendetta](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/vendetta/32/533_2.png) [@Vendetta](https://forum.choiceofgames.com/u/Vendetta)\
**Post date:** [August 28, 2018, 10:38pm UTC](https://forum.choiceofgames.com/t/having-trouble-spotting-the-bug/43192/7 "2018-08-28T22:38:25Z")

</div>

If the original command at the top of all this is an actual `*choice` then it’s falling out of the two nested `*fake_choice` options which have no `*goto` or similar (‘_As much as we could_’ and ‘_We did some preparation_’).

Even though that nested block is a `*fake_choice`, the original `*choice` still requires a `*goto` or `*finish` for all nested blocks below it.

---

<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:** [August 28, 2018, 11:00pm UTC](https://forum.choiceofgames.com/t/having-trouble-spotting-the-bug/43192/8 "2018-08-28T23:00:44Z")

</div>

In general nesting `*fake_choice`s doesn’t work (which is what I’m assuming the case is). If you’re intent on nesting those, you’ll need to switch over the `implicit_control_flow`.

> [@New ChoiceScript features: implicit control flow, gosub parameters](https://forum.choiceofgames.com/t/new-choicescript-features-implicit-control-flow-gosub-parameters/30042):
>
> Thanks to a big code contribution from @kgold, there are new features to try in the latest version of ChoiceScript up on GitHub: implicit control flow and \*gosub parameters. Implicit control flow Normally, you have to use a \*goto before the end of a \*choice #option or before an \*else, or you’ll get errors like this: It is illegal to fall out of a \*choice statement; you must \*goto or \*finish before the end of the indented block. It is illegal to fall in to an \*else statement; you must \*goto o…

---

<div class="post-metadata">

**Author:** ![Nahim\_Kerman](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/nahim_kerman/32/62734_2.png) [@Nahim\_Kerman](https://forum.choiceofgames.com/u/Nahim_Kerman)\
**Post date:** [August 29, 2018, 3:23am UTC](https://forum.choiceofgames.com/t/having-trouble-spotting-the-bug/43192/9 "2018-08-29T03:23:09Z")

</div>

Ast he friend said. One can not mix fake\_choices with \*goto or \*goto\_scene. They didn’t suppose to work together.

---

<div class="post-metadata">

**Author:** ![Hazel](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/hazel/32/77796_2.png) [@Hazel](https://forum.choiceofgames.com/u/Hazel)\
**Post date:** [August 29, 2018, 6:00am UTC](https://forum.choiceofgames.com/t/having-trouble-spotting-the-bug/43192/10 "2018-08-29T06:00:01Z")

</div>

Design-wise, once your choices are stacked four-deep, you can really start considering moving some of the content of the options into separate labels.

If you choose not to do this, then “\*goto\_scene chapterthree” should be the very last line for every option nested under the top-most \*choice command.

---

<div class="post-metadata">

**Author:** ![AChubbyBlackCat](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/achubbyblackcat/32/242883_2.png) [@AChubbyBlackCat](https://forum.choiceofgames.com/u/AChubbyBlackCat)\
**Post date:** [August 29, 2018, 3:29pm UTC](https://forum.choiceofgames.com/t/having-trouble-spotting-the-bug/43192/11 "2018-08-29T15:29:44Z")

</div>

Maybe. Except the \*fake\_choices of “How much preparation did you do beforehand?” and “What role did you take in committing this crime?” are supposed to follow one after another in the narrative.

One of the four parent options from the original \*choice are #Chapter One, #Chapter Two, #Chapter Four, and then #Comprehension and Analysis Questions. Within each of these options there are more \*fake\_choices that will \*set certain things.

I’ll toggle around with it some more. Maybe the nested \*fake\_choices underneath #Chapter Three aren’t supposed to be indented that far in. :thinks:

---

<div class="post-metadata">

**Author:** ![AChubbyBlackCat](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/achubbyblackcat/32/242883_2.png) [@AChubbyBlackCat](https://forum.choiceofgames.com/u/AChubbyBlackCat)\
**Post date:** [August 29, 2018, 3:43pm UTC](https://forum.choiceofgames.com/t/having-trouble-spotting-the-bug/43192/12 "2018-08-29T15:43:15Z")

</div>

> [@AChubbyBlackCat](#):
>
> Maybe the nested \*fake\_choices underneath #Chapter Three aren’t supposed to be indented that far in. :thinks:

Yup. This was the problem. Too much indentation. 😃 Thanks for everyone who commented/helped!
