Script errors in Error List reference wrong line

Posts: 19
Any error from a script in the Error List references one line earlier than where the error occurs.

For example, if the Error List reports "(Line 60) ; expected", there is actually a missing semicolon in Line 61 (according to the numbered lines in the script editor).
Edited (1 time)
Posts: 785
Can you reproduce this in every single script? I'm assuming you mean C# scripts, or is it also in other languages? It may be related to some specific script lines that the compiler somehow doesn't include. Your script is compiled and any errors from that compilation are fed straight to the ATVO error list so we cannot really fix this. It is likely that the compiler is doing some optimization on the code resulting in some lines missing.

If it is literally every single script I can see if I can just add 1 to the line number, but I doubt it...
Posts: 19
Line count is incorrect in C# and Visual Basic. Line count is correct in JavaScript.

In Phyton and Lua the line number is not shown at all. The standard example code for Ruby didn't compile for me, so I couldn't test it.


Edited (1 time)
Posts: 785
I see. Actually it is not so easy to just add 1 to this because like I said the error comes straight out of the compiler. I'd have to somehow capture that error, parse it and change the line number. It would be quite some work and could introduce bugs so I'd rather leave it like this. I don't think it's a very serious issue, if you know about it you can add 1 yourself and if not you'll probably find out soon enough that you have to look one line further.

In each case I would encourage everyone to use Visual Studio Code to do the scripting anyway as our script editor is not as powerful.
Posts: 19
Ok, no problem then, I can live with that.
Posts: 785
Thanks to Simon we fixed it, turns out I can just add a blank line to the source before compiling and that will offset the line number to match :)