Wrong line number


#1

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

The code:

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


#2

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?


#3

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


#4

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

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


#5

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


#6

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 : )


#7

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!


#8

Appreciate your attempt! Thank you