# Wrong line number

**URL:** <https://forum.choiceofgames.com/t/wrong-line-number/20378>\
**Category:** ChoiceScript Help\
**Created:** [September 10, 2016, 2:07pm UTC](https://forum.choiceofgames.com/t/wrong-line-number/20378 "2016-09-10T14:07:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Charles\_Parkes](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/charles_parkes/32/13554_2.png) [@Charles\_Parkes](https://forum.choiceofgames.com/u/Charles_Parkes)\
**Post date:** [September 10, 2016, 2:07pm UTC](https://forum.choiceofgames.com/t/wrong-line-number/20378/1 "2016-09-10T14:07:17Z")

</div>

Is anyone familiar with browser error messages reporting a problem, but giving the wrong line number?

I can only guess this started happening as my code has gotten more complicated. It’s obviously frustrating due to the extra time needed to find the problem in a different line

Quick example of a one line deviation:

The message:

[https://dl.dropboxusercontent.com/u/47183494/pics%20charles/Screen%20Shot%202016-09-10%20at%2015.08.23.png](https://dl.dropboxusercontent.com/u/47183494/pics%20charles/Screen%20Shot%202016-09-10%20at%2015.08.23.png)

The code:

[https://dl.dropboxusercontent.com/u/47183494/pics%20charles/Screen%20Shot%202016-09-10%20at%2015.08.06.png](https://dl.dropboxusercontent.com/u/47183494/pics%20charles/Screen%20Shot%202016-09-10%20at%2015.08.06.png)

---

<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:** [September 10, 2016, 2:12pm UTC](https://forum.choiceofgames.com/t/wrong-line-number/20378/2 "2016-09-10T14:12:05Z")

</div>

Sometimes the ChoiceScript interpreter will throw an error for one line due to a more silent issue on a preceding line, further up in your code.

This is usually a logical error, for example, if you’ve forgotten to include a \*goto\_scene at a certain point, the code will “fall through”, which is valid, but not intentional. This would then throw an error if later down the line it encountered a variable that wasn’t defined (as it wouldn’t usually need to be, had the code taken the other route).

EDIT: Just seen your screenshots, in that circumstance, try opening it in another code editor? How far out is the line?

---

<div class="post-metadata">

**Author:** ![Charles\_Parkes](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/charles_parkes/32/13554_2.png) [@Charles\_Parkes](https://forum.choiceofgames.com/u/Charles_Parkes)\
**Post date:** [September 10, 2016, 2:14pm UTC](https://forum.choiceofgames.com/t/wrong-line-number/20378/3 "2016-09-10T14:14:03Z")

</div>

Give me a second - takes a moment to open (oh, and I believe in some circumstances its been more than 1 line. I’ll see if I can make it give me an example)

Komodo

[https://dl.dropboxusercontent.com/u/47183494/pics%20charles/Screen%20Shot%202016-09-10%20at%2015.15.38.png](https://dl.dropboxusercontent.com/u/47183494/pics%20charles/Screen%20Shot%202016-09-10%20at%2015.15.38.png)

---

<div class="post-metadata">

**Author:** ![Charles\_Parkes](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/charles_parkes/32/13554_2.png) [@Charles\_Parkes](https://forum.choiceofgames.com/u/Charles_Parkes)\
**Post date:** [September 10, 2016, 2:24pm UTC](https://forum.choiceofgames.com/t/wrong-line-number/20378/4 "2016-09-10T14:24:34Z")

</div>

Here we go. Variance of more than one line:

[https://dl.dropboxusercontent.com/u/47183494/pics%20charles/Screen%20Shot%202016-09-10%20at%2015.22.12.png](https://dl.dropboxusercontent.com/u/47183494/pics%20charles/Screen%20Shot%202016-09-10%20at%2015.22.12.png)

Code: (see the unecessary = 7 lines below)

[https://dl.dropboxusercontent.com/u/47183494/pics%20charles/Screen%20Shot%202016-09-10%20at%2015.22.02.png](https://dl.dropboxusercontent.com/u/47183494/pics%20charles/Screen%20Shot%202016-09-10%20at%2015.22.02.png)

---

<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:** [September 10, 2016, 2:31pm UTC](https://forum.choiceofgames.com/t/wrong-line-number/20378/5 "2016-09-10T14:31:13Z")

</div>

That’s very odd. Are you using the latest build of ChoiceScript from [https://www.github.com/dfabulich/choicescript](https://www.github.com/dfabulich/choicescript)?

---

<div class="post-metadata">

**Author:** ![Charles\_Parkes](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/charles_parkes/32/13554_2.png) [@Charles\_Parkes](https://forum.choiceofgames.com/u/Charles_Parkes)\
**Post date:** [September 10, 2016, 2:40pm UTC](https://forum.choiceofgames.com/t/wrong-line-number/20378/6 "2016-09-10T14:40:46Z")

</div>

I’ve just redownloaded and tested and continue to have the issue.

Believe its an issue with the coding in my scene files.

Don’t worry! I can work with it. I was curious whether it was common or if anyone had seen it before : )

---

<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:** [September 10, 2016, 3:02pm UTC](https://forum.choiceofgames.com/t/wrong-line-number/20378/7 "2016-09-10T15:02:46Z")

</div>

Can’t say I have personally. Maybe one line off, but that can be down to something as simple as whether an application starts at line 1 or line 0 etc. Sorry I can’t be of much help there!

---

<div class="post-metadata">

**Author:** ![Charles\_Parkes](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/charles_parkes/32/13554_2.png) [@Charles\_Parkes](https://forum.choiceofgames.com/u/Charles_Parkes)\
**Post date:** [September 10, 2016, 3:03pm UTC](https://forum.choiceofgames.com/t/wrong-line-number/20378/8 "2016-09-10T15:03:24Z")

</div>

Appreciate your attempt! Thank you
