Page 1 of 1

[b25] ]] in Lua, is it bug or not?

Posted: Fri May 13, 2011 1:39 pm
by sindikat
Let's say i've created a static map like that
map = [[
~~~
~~~
~~~]]

everything works fine. But when i create a map like that

map = [[
~~~
~~~
~~~
]]

try to go to the south and you will have an error thrown, like the hero went past the lower border. Is it Lua specific syntax thing or a bug? If former, then it should be noted somewhere in a guide, i think.

P.S.: admin, do you plan to create a bug-tracker?

Re: [b25] ]] in Lua, is it bug or not?

Posted: Fri May 13, 2011 2:27 pm
by Grey
Well I wouldn't call it a bug - the brackets act as quotations, so you're adding in an extra line in the second example. It's annoying when you forget of course, but rather to be expected. Still, I imagine a fix is possible (check for nil values on last line of array).