lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


local b = ""
b = string.sub(
  "abc", 2)
print(b)

The above code has a breakpoint on its line 2.
When it stops on the breakpoint and is continued via either
"step" or "step over", the following error is produced:

lua: mytest2.lua:2: attempt to call field 'sub' (a table value)
stack traceback:
	mytest2.lua:2: in main chunk
	[C]: ?

However, if the function call isn't split on two lines,
then the script runs just fine:

local b = ""
b = string.sub("abc", 2)
print(b)

Comments?
--
Shmuel