Plugin:OpenScript() one line off

Function void Plugin:OpenScript(Instance script, int lineNumber = 0) [PluginSecurity]

If you want to open the 3rd line in a script, you have to use 2 as lineNumber.
This is a bit weird since Lua starts at 1, not 0.
The script editor also starts at 1, not 0.
And to finish it: The error stacktraces also start at 1, not 0.

I r8 8/8, not 0 (ignore)

3 Likes

I’m actually seeing this in the reverse order, with 1 putting me at line 2, 60 being at 61, etc. What OS are you using?

Eh I wrote it wrong here.
That’s indeed what’s the case.
Passing 0 as argument gives line 1 etc.

EDIT: Wait we’re saying the same, I was right and so were you.

Ah, well in that case, it’s most certainly a bug and I’ll add it to our list. Nice catch!

1 Like