# Invalid expression, couldn't extract another token

**URL:** <https://forum.choiceofgames.com/t/invalid-expression-couldnt-extract-another-token/39259>\
**Category:** ChoiceScript Help\
**Created:** [May 23, 2018, 7:51pm UTC](https://forum.choiceofgames.com/t/invalid-expression-couldnt-extract-another-token/39259 "2018-05-23T19:51:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElvesForTheWin](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/elvesforthewin/32/102849_2.png) [@ElvesForTheWin](https://forum.choiceofgames.com/u/ElvesForTheWin)\
**Post date:** [May 23, 2018, 7:51pm UTC](https://forum.choiceofgames.com/t/invalid-expression-couldnt-extract-another-token/39259/1 "2018-05-23T19:51:36Z")

</div>

The title error popped up when I tried to run this:

```
*choice
 *if (robots > 1) *hide_reuse #Use the blue stone on the remaining robots.
  *set robots2 true
  You turn towards the last two robots. You wave your left hand and the stone begins to glow. The merciless sockets of the robots immediatly glow with the same sea-blue of the gem. They turn and face you, seemingly waiting for instructions. You have a pair of awesome robot servants to command!
  *goto thechoice
 *if (gang) #Execute your gang.
  *set benevolent-25
  *if (not(robots2))
          *goto gggee

```

I apologise if it is something stupidly simple or summat in advance.

---

<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:** [May 23, 2018, 7:52pm UTC](https://forum.choiceofgames.com/t/invalid-expression-couldnt-extract-another-token/39259/2 "2018-05-23T19:52:26Z")

</div>

Your indenting looks a little messed up for starters.

I just happened to be writing my own thing right now. So this is a rough example from my WIP.

```
# how about dealing with one that isn't stupid?"
	"YEAH!" Setsuna loudly cheers while watching before he face quickly contorts to being confused. "What?"

	"I don't know. You're trying to mess with me. Looks like I'm dealing with someone whose got to be pretty stupid."

	"...that shit talking of yours. Does it bother you to be still be using lines you thought of in kindergarten?"
	*set Gender "Female"
	*page_break
	*goto Northpointfocusromancefemale

```

It’s a little hard to tell with the format but take note of where \*set is. It’s not on the same line of the option.  
#Option  
double tab Words  
double tab \*set  
double tab \*goto

#option  
double tab Words.

Well, you get the idea.

---

<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:** [May 23, 2018, 7:53pm UTC](https://forum.choiceofgames.com/t/invalid-expression-couldnt-extract-another-token/39259/3 "2018-05-23T19:53:08Z")

</div>

I believe the problem there is that you have to split `*hide_reuse` onto a new line:

```
*choice
  *if (foo)
    *hide_reuse #Text option
      Body

```

---

<div class="post-metadata">

**Author:** ![fairlyfairfighter](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/fairlyfairfighter/32/57910_2.png) [@fairlyfairfighter](https://forum.choiceofgames.com/u/fairlyfairfighter)\
**Post date:** [May 23, 2018, 7:55pm UTC](https://forum.choiceofgames.com/t/invalid-expression-couldnt-extract-another-token/39259/4 "2018-05-23T19:55:14Z")

</div>

As already said, but I think if you want to keep it on one line \*selectable\_if works?

And on the wiki it says

```
Invalid expression, couldn't extract another token
If this error occurs, it means you've used characters that don't exist in the English language. Note that most programming languages require you to only use alphanumeric characters that exist in the English language (which means if you use the "alpha" character from the greek alphabet, you'll encounter this error).

```

And I’m confused how this would be the case here

---

<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:** [May 23, 2018, 7:55pm UTC](https://forum.choiceofgames.com/t/invalid-expression-couldnt-extract-another-token/39259/5 "2018-05-23T19:55:45Z")

</div>

I think putting the hide\_reuse first and then the if works though.

---

<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:** [May 23, 2018, 8:58pm UTC](https://forum.choiceofgames.com/t/invalid-expression-couldnt-extract-another-token/39259/6 "2018-05-23T20:58:37Z")

</div>

> [@ElvesForTheWin](#):
>
> The title error popped up when I tried to run this:

What error message you get?

* * *

My guess, the culprit is your last `*goto`.

```choicescript
*if not(robots2)
 *goto gggee

```

Just indent it once.

Edit:  
Oh, and as others said, your `*if robots > 1` should be on its own line.

---

<div class="post-metadata">

**Author:** ![ElvesForTheWin](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/elvesforthewin/32/102849_2.png) [@ElvesForTheWin](https://forum.choiceofgames.com/u/ElvesForTheWin)\
**Post date:** [May 24, 2018, 6:33am UTC](https://forum.choiceofgames.com/t/invalid-expression-couldnt-extract-another-token/39259/7 "2018-05-24T06:33:36Z")

</div>

Thanks guys. I’ll try it out later today.

---

<div class="post-metadata">

**Author:** ![lunawisp](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/lunawisp/32/85423_2.png) [@lunawisp](https://forum.choiceofgames.com/u/lunawisp)\
**Post date:** [May 24, 2018, 8:09am UTC](https://forum.choiceofgames.com/t/invalid-expression-couldnt-extract-another-token/39259/8 "2018-05-24T08:09:18Z")

</div>

If you struggle with hide\_reuse (and I know I do sometimes), you could use variables instead. Like ‘myflag’ below. One advantage of using a global variable created in startup.txt is that it stays valid if you come back into the scene again. The hide\_reuse acts like a temp variable and is lost when you exit the scene.

```
*choice
  *if ((robots > 1) and (myflag = false)) #Use the blue stone on the remaining robots.
    *set myflag true
    *set robots2 true
```
