unpack and table.unpack for Lua 5.2 [message #1220815] |
Fri, 13 December 2013 13:40  |
Eclipse User |
|
|
|
I have just started using Koneki and have created new project and selected Lua 5.2 as a targeted execution environment.
All is fine for now, only when I use table.unpack() in my code I get this exception:
main.lua:31: attempt to call field 'unpack' (a nil value)
However, code completion shows unpack when I type table<dot> and when I hover with mouse over unpack() in table.unpack() it shows doc entry for table.unpack().
Changing table.unpack() with just unpack() does not create an exception.
Code that doesn't work:
function unpackit(tt)
table.unpack(tt)
for k,v in ipairs(tt) do
print (k, type(v))
end
end
and code that works:
function unpackit(tt)
unpack(tt)
for k,v in ipairs(tt) do
print (k, type(v))
end
end
So, is my project using 5.2 or 5.1?
Thanks!
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03685 seconds