# Error with "nonexistent" variable that actually exists

**URL:** <https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047>\
**Category:** ChoiceScript Help\
**Created:** [June 26, 2021, 12:49am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047 "2021-06-26T00:49:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![RascaldeesV2](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/rascaldeesv2/32/144587_2.png) [@RascaldeesV2](https://forum.choiceofgames.com/u/RascaldeesV2)\
**Post date:** [June 26, 2021, 12:49am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047/1 "2021-06-26T00:49:55Z")

</div>

Having trouble with a variable that is returning as “nonexistent” despite it existing in the \*startup file? I’m not really sure what’s going on here since the only thing it’s returning is “nonexistent variable”.

The variables in the startup file:

```
*create AlienDogName "text"
*create RoombaName "text"

```

The code where it’s saying the variable doesn’t exist:

```
What will you name the dog?

*input_text AlienDogName

*page_break
*goto RoombaName

*label RoombaName

And what will you name the machine?

*input_text RoombaName

*page_break

```

I will note that there is another section of the game where the same code IS working.

---

<div class="post-metadata">

**Author:** ![CC\_Hill](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cc_hill/32/256033_2.png) [@CC\_Hill](https://forum.choiceofgames.com/u/CC_Hill)\
**Post date:** [June 26, 2021, 1:01am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047/2 "2021-06-26T01:01:52Z")

</div>

Your variable actually have the same name as the label, maybe try changing the label name by adding a number a the end for example

\*goto RoombaName1. Not sure.

---

<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:** [June 26, 2021, 1:07am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047/3 "2021-06-26T01:07:34Z")

</div>

further advice:  
make all variables lowercase. this stuff can be dreadfully case sensitive.

---

<div class="post-metadata">

**Author:** ![RascaldeesV2](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/rascaldeesv2/32/144587_2.png) [@RascaldeesV2](https://forum.choiceofgames.com/u/RascaldeesV2)\
**Post date:** [June 26, 2021, 1:08am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047/4 "2021-06-26T01:08:09Z")

</div>

I thought C-Script wasn’t case sensitive?

Also changed the label and such. @CC_Hill . Still getting the same error.

---

<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:** [June 26, 2021, 1:15am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047/5 "2021-06-26T01:15:02Z")

</div>

it can be fiddly.

try making it lower case, resave and try again?

---

<div class="post-metadata">

**Author:** ![RascaldeesV2](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/rascaldeesv2/32/144587_2.png) [@RascaldeesV2](https://forum.choiceofgames.com/u/RascaldeesV2)\
**Post date:** [June 26, 2021, 1:15am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047/6 "2021-06-26T01:15:23Z")

</div>

The RoombaName input text or the label?

---

<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:** [June 26, 2021, 1:28am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047/7 "2021-06-26T01:28:39Z")

</div>

the variable

---

<div class="post-metadata">

**Author:** ![RascaldeesV2](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/rascaldeesv2/32/144587_2.png) [@RascaldeesV2](https://forum.choiceofgames.com/u/RascaldeesV2)\
**Post date:** [June 26, 2021, 1:29am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047/8 "2021-06-26T01:29:34Z")

</div>

Alright. I assume I’ll have to lowercase it in the startup file as well then?

---

<div class="post-metadata">

**Author:** ![RascaldeesV2](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/rascaldeesv2/32/144587_2.png) [@RascaldeesV2](https://forum.choiceofgames.com/u/RascaldeesV2)\
**Post date:** [June 26, 2021, 1:46am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047/9 "2021-06-26T01:46:40Z")

</div>

Changed both. Testing now.

As a side note; quick-test isn’t picking up this error. It’s only when players are going through dashingdon that the error occurs. Apologies for any delays as a result.

---

<div class="post-metadata">

**Author:** ![CC\_Hill](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cc_hill/32/256033_2.png) [@CC\_Hill](https://forum.choiceofgames.com/u/CC_Hill)\
**Post date:** [June 26, 2021, 2:16am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047/10 "2021-06-26T02:16:05Z")

</div>

Did you try to test it yourself and see if you get the error too on your side? I was testing a game just now on Dashington and got an error but the game still played as usual. It was strange.

---

<div class="post-metadata">

**Author:** ![RascaldeesV2](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/rascaldeesv2/32/144587_2.png) [@RascaldeesV2](https://forum.choiceofgames.com/u/RascaldeesV2)\
**Post date:** [June 26, 2021, 2:21am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047/11 "2021-06-26T02:21:19Z")

</div>

I got the same error, yes. Weirdly, quick-test popped on _something_ just now but it was unrelated to this particular error.

I think I’m becoming the embodiment of this now:

[my-code-doesntwork-i-have-no-idea-why-my-code-14032929.png (500×781) (onsizzle.com)](https://pics.onsizzle.com/my-code-doesntwork-i-have-no-idea-why-my-code-14032929.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:** [June 26, 2021, 2:23am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047/12 "2021-06-26T02:23:23Z")

</div>

did you reupload ALL files?

---

<div class="post-metadata">

**Author:** ![RascaldeesV2](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/rascaldeesv2/32/144587_2.png) [@RascaldeesV2](https://forum.choiceofgames.com/u/RascaldeesV2)\
**Post date:** [June 26, 2021, 2:24am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047/13 "2021-06-26T02:24:25Z")

</div>

Not in the most recent update. Just CH3.

---

<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:** [June 26, 2021, 2:26am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047/14 "2021-06-26T02:26:48Z")

</div>

try reuploading all files

---

<div class="post-metadata">

**Author:** ![RascaldeesV2](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/rascaldeesv2/32/144587_2.png) [@RascaldeesV2](https://forum.choiceofgames.com/u/RascaldeesV2)\
**Post date:** [June 26, 2021, 2:28am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047/15 "2021-06-26T02:28:03Z")

</div>

Ye. Just did that now. Quick-test isn’t showing any errors now (it did that before though so idk). Hopefully it will fix the problem. I’ll have to test it in a bit.

---

<div class="post-metadata">

**Author:** ![CC\_Hill](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cc_hill/32/256033_2.png) [@CC\_Hill](https://forum.choiceofgames.com/u/CC_Hill)\
**Post date:** [June 26, 2021, 2:35am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047/16 "2021-06-26T02:35:57Z")

</div>

I would say do a search of the particular variable RoombaName in the file in question… it can be that you just have the variable written somewhere by itself and not in brackets like ${RoombaName}

![image](https://global.discourse-cdn.com/choiceofgames/original/3X/1/0/10f56e2815397e6fa63993de1e212baad32bb238.png)

---

<div class="post-metadata">

**Author:** ![RascaldeesV2](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/rascaldeesv2/32/144587_2.png) [@RascaldeesV2](https://forum.choiceofgames.com/u/RascaldeesV2)\
**Post date:** [June 26, 2021, 2:50am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047/17 "2021-06-26T02:50:32Z")

</div>

Completed. No errors found.

---

<div class="post-metadata">

**Author:** ![Havenstone](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/havenstone/32/198451_2.png) [@Havenstone](https://forum.choiceofgames.com/u/Havenstone)\
**Post date:** [June 26, 2021, 3:27am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047/18 "2021-06-26T03:27:29Z")

</div>

Two things you’re doing are I believe considered poor general coding practice – not having your variables in all lowercase, and having labels with the same name as a variable – but they do not actually cause ChoiceScript to choke. CS is built to be pretty robust to less-than-ideal coding practices. Whatever the reason for your problem, it’s neither of those things.

Does the line reference in your error message make clear which variable it’s choking on? That should point you to the line of code that’s causing problems. CSIDE in particular is good for jumping you straight to the specific line of trouble code when CS crashes.

---

<div class="post-metadata">

**Author:** ![RascaldeesV2](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/rascaldeesv2/32/144587_2.png) [@RascaldeesV2](https://forum.choiceofgames.com/u/RascaldeesV2)\
**Post date:** [June 26, 2021, 3:29am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047/19 "2021-06-26T03:29:16Z")

</div>

I’m actually not getting an error code from Quick-test when this error occurs. Dashingdon tells me it’s on the line that involves “\*input\_text RoombaName” but this line of code is working in other sections of the game and other similar pieces are still working.

Big fan of your work by the way.

Edit:

The \*goto and \*label in that section were not there before when this error first occurred. I added them in an attempt to fix it since I couldn’t find the error myself.

---

<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:** [June 26, 2021, 3:53am UTC](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047/20 "2021-06-26T03:53:28Z")

</div>

Seeing it had no errors after reuploading, it’s likely the startup on dashing did not contain the variable

[Next page](https://forum.choiceofgames.com/t/error-with-nonexistent-variable-that-actually-exists/103047.md?page=2)
