# Need help: Invalid expression, couldn't extract another token

**URL:** <https://forum.choiceofgames.com/t/need-help-invalid-expression-couldnt-extract-another-token/28172>\
**Category:** ChoiceScript Help\
**Created:** [July 1, 2017, 12:30am UTC](https://forum.choiceofgames.com/t/need-help-invalid-expression-couldnt-extract-another-token/28172 "2017-07-01T00:30:22Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![bl00dragon](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bl00dragon/32/228201_2.png) [@bl00dragon](https://forum.choiceofgames.com/u/bl00dragon)\
**Post date:** [July 1, 2017, 12:30am UTC](https://forum.choiceofgames.com/t/need-help-invalid-expression-couldnt-extract-another-token/28172/1 "2017-07-01T00:30:22Z")

</div>

Hello, I need help with an error that I can’t make sense off. Here:  
[https://forum.choiceofgames.com/uploads/short-url/5XItSBmPiefibf70dwQcpz5QH6h.png](https://forum.choiceofgames.com/uploads/short-url/5XItSBmPiefibf70dwQcpz5QH6h.png)

The concerned bit of code is this:

```
*choice
 *if (theatricality > 50) #...
  ...
  *choice
   # 
   #

```

 ![](https://global.discourse-cdn.com/choiceofgames/original/3X/7/c/7cfb4753ea720983f6ddc53f8e5a92fc55bd0fe5.png)

I already solved a similar error earlier, but the problem does not seem to be the same at all. And there seem to be nothing wrong at all with this particular part the error is indicating. I’ve tried looking higher and lower into the code, but nothing seems to be wrong.

---

<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:** [July 1, 2017, 12:55am UTC](https://forum.choiceofgames.com/t/need-help-invalid-expression-couldnt-extract-another-token/28172/2 "2017-07-01T00:55:33Z")

</div>

I forget, doesn’t the red disk icon in notepad++ mean that a file isn’t saved?

---

<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:** [July 1, 2017, 12:56am UTC](https://forum.choiceofgames.com/t/need-help-invalid-expression-couldnt-extract-another-token/28172/3 "2017-07-01T00:56:45Z")

</div>

I just had this error but with a nested \*fake\_choice within the choice, the only way I could fix it was not nesting it. You could try moving the nested choice to an entirely new label, I think that’ll fix the issue.

---

<div class="post-metadata">

**Author:** ![Szaal](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/szaal/32/112202_2.png) [@Szaal](https://forum.choiceofgames.com/u/Szaal)\
**Post date:** [July 1, 2017, 1:00am UTC](https://forum.choiceofgames.com/t/need-help-invalid-expression-couldnt-extract-another-token/28172/4 "2017-07-01T01:00:08Z")

</div>

Well, quicktest and randomtest willl always report error whenever they pass through a nested `*fake_choice`. But the truth is, you can play through it in-game normally (not on every occassion, ofc).

That’s one of the reason why I rely on local Alpha-Testing rather using quicktest/randomtest ☹

* * *

I’d agree with @RETowers at here. Maybe you forgot to save your changes, @bl00dragon 😝

---

<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:** [July 1, 2017, 1:03am UTC](https://forum.choiceofgames.com/t/need-help-invalid-expression-couldnt-extract-another-token/28172/5 "2017-07-01T01:03:43Z")

</div>

Really, I had no clue! I still feel like I need to appease the technology before I put out content for human testing. 😛

I actually thought the red text is the usual color of choices with the syntax highlighter.

---

<div class="post-metadata">

**Author:** ![Szaal](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/szaal/32/112202_2.png) [@Szaal](https://forum.choiceofgames.com/u/Szaal)\
**Post date:** [July 1, 2017, 1:07am UTC](https://forum.choiceofgames.com/t/need-help-invalid-expression-couldnt-extract-another-token/28172/6 "2017-07-01T01:07:03Z")

</div>

Lel. What I meant by local Alpha-Testing is actually “I’ll skip-read and click my mouse rapidly on all of these possible choices on my laptop” 😆

About the red coloration, it’s actually the OP’s preference.  
And I don’t use red. It’s evil 🙄

🏃🏾‍♂️ 🌫

---

<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:** [July 1, 2017, 1:17am UTC](https://forum.choiceofgames.com/t/need-help-invalid-expression-couldnt-extract-another-token/28172/7 "2017-07-01T01:17:31Z")

</div>

@Szaal 🤷‍♀️ I use Sublime now, and I have a personally written syntax highlighter. I like having the ability to arbitrarily highlight whatever I want in whatever way I want.

@seabean However, that’s not what I’m talking about. In the screenshot of Notepad++ there are a bunch of tabs at the top, each with a floppy disc next to it. I believe the red floppy means the file is not saved.

---

<div class="post-metadata">

**Author:** ![bl00dragon](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bl00dragon/32/228201_2.png) [@bl00dragon](https://forum.choiceofgames.com/u/bl00dragon)\
**Post date:** [July 1, 2017, 7:32am UTC](https://forum.choiceofgames.com/t/need-help-invalid-expression-couldnt-extract-another-token/28172/8 "2017-07-01T07:32:50Z")

</div>

> [@RETowers](#):
>
> I forget, doesn’t the red disk icon in notepad++ mean that a file isn’t saved?

Yeah, because I changed something before the screenshot.

> [@seabean](#):
>
> I just had this error but with a nested \*fake\_choice within the choice, the only way I could fix it was not nesting it. You could try moving the nested choice to an entirely new label, I think that’ll fix the issue.

Choice within choices don’t work? Ok then.

> [@Szaal](#):
>
> I’d agree with @RETowers at here. Maybe you forgot to save your changes, @bl00dragon 😝

Nope, that’s not it. XD

> [@seabean](#):
>
> I actually thought the red text is the usual color of choices with the syntax highlighter.

That’s my personalized version of the highlighter.

> [@Szaal](#):
>
> About the red coloration, it’s actually the OP’s preference.  
> And I don’t use red. It’s evil 🙄

Yep. I use it because it’s very noticeable. But I understand that it would hurt other people’s eyes. :3

> [@RETowers](#):
>
> I believe the red floppy means the file is not saved.

Yes. But I reflexively save every time before I test it.

---

<div class="post-metadata">

**Author:** ![Szaal](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/szaal/32/112202_2.png) [@Szaal](https://forum.choiceofgames.com/u/Szaal)\
**Post date:** [July 1, 2017, 7:37am UTC](https://forum.choiceofgames.com/t/need-help-invalid-expression-couldnt-extract-another-token/28172/9 "2017-07-01T07:37:30Z")

</div>

Ah, btw I just remembered!

Try moving your `#Option` away from the `*if`

I mean, from being this ❌

```
*choice
 *if (theatricality > 50) #... <<<
  ...
  *choice
   # 
   #

```

To this ☑

```
*choice
 *if (theatricality > 50)
   #... <<<
   ...
   *choice
    # 
    #

```

Surely the following related indentation should be bumped once more 🤔

---

<div class="post-metadata">

**Author:** ![bl00dragon](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bl00dragon/32/228201_2.png) [@bl00dragon](https://forum.choiceofgames.com/u/bl00dragon)\
**Post date:** [July 1, 2017, 7:39am UTC](https://forum.choiceofgames.com/t/need-help-invalid-expression-couldnt-extract-another-token/28172/10 "2017-07-01T07:39:28Z")

</div>

Ok, I’ll try doing that.

---

<div class="post-metadata">

**Author:** ![bl00dragon](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bl00dragon/32/228201_2.png) [@bl00dragon](https://forum.choiceofgames.com/u/bl00dragon)\
**Post date:** [July 1, 2017, 8:06am UTC](https://forum.choiceofgames.com/t/need-help-invalid-expression-couldnt-extract-another-token/28172/11 "2017-07-01T08:06:24Z")

</div>

> [@Szaal](#):
>
> To this ☑

It works now. Thank you.

While I’m at it, is there any way to stop the annoying bugs that happen when you do not launch the game in a private window?

---

<div class="post-metadata">

**Author:** ![Szaal](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/szaal/32/112202_2.png) [@Szaal](https://forum.choiceofgames.com/u/Szaal)\
**Post date:** [July 1, 2017, 8:21am UTC](https://forum.choiceofgames.com/t/need-help-invalid-expression-couldnt-extract-another-token/28172/12 "2017-07-01T08:21:22Z")

</div>

> [@bl00dragon](#):
>
> in a private window?

Private window? Do you mean something like anonymous browsing ?👤

---

<div class="post-metadata">

**Author:** ![bl00dragon](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bl00dragon/32/228201_2.png) [@bl00dragon](https://forum.choiceofgames.com/u/bl00dragon)\
**Post date:** [July 1, 2017, 8:22am UTC](https://forum.choiceofgames.com/t/need-help-invalid-expression-couldnt-extract-another-token/28172/13 "2017-07-01T08:22:40Z")

</div>

> [@Szaal](#):
>
> Private window? Do you mean something like anonymous browsing ?👤

Yes. There’s bugs that appear randomly, often with indent, when you don’t open the game in a private window of your browser.

---

<div class="post-metadata">

**Author:** ![Szaal](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/szaal/32/112202_2.png) [@Szaal](https://forum.choiceofgames.com/u/Szaal)\
**Post date:** [July 1, 2017, 8:30am UTC](https://forum.choiceofgames.com/t/need-help-invalid-expression-couldnt-extract-another-token/28172/14 "2017-07-01T08:30:07Z")

</div>

Hmm… I just did a quick local testing via private window and didn’t catch up any bugs.

What does the error report said when it shows up?

---

<div class="post-metadata">

**Author:** ![bl00dragon](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/bl00dragon/32/228201_2.png) [@bl00dragon](https://forum.choiceofgames.com/u/bl00dragon)\
**Post date:** [July 1, 2017, 8:31am UTC](https://forum.choiceofgames.com/t/need-help-invalid-expression-couldnt-extract-another-token/28172/15 "2017-07-01T08:31:51Z")

</div>

> [@Szaal](#):
>
> Hmm… I just did a quick local testing via private window and didn’t catch up any bugs.

The errors only appear when you’re not in a private window. It’s linked to Dashingdon I think.

> [@Szaal](#):
>
> What does the error report said when it shows up?

Just a regular indent error: “is 2 should be 1” when the indent is perfectly fine in the code.

---

<div class="post-metadata">

**Author:** ![Szaal](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/szaal/32/112202_2.png) [@Szaal](https://forum.choiceofgames.com/u/Szaal)\
**Post date:** [July 1, 2017, 8:42am UTC](https://forum.choiceofgames.com/t/need-help-invalid-expression-couldnt-extract-another-token/28172/16 "2017-07-01T08:42:07Z")

</div>

Oooh  
So you’re testing your WIP on dashingdon while not in a private window, then?

I’m not sure if it’s the case, but try the old trick of clearing your cache/cookie/whatnot
