lua-users home
lua-l archive

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


I just want to get access to var2 and var3.

Foo ( var1, 
{ var2, "var3" }
)

function Foo( firstvar, ... )
local v1, v2 = ... -- says that v1 (var2) is a table :(

-- test to see how deep this table goes
-- causes infinite loop
local table1 = ...
while ( type( table1 ) == "table" ) do
local x, y = table1
table1 = x 
print( "\nanother table" )
end
end

What's going on here? Why can't I access var2 and var3? I'm sure I'm making some simple mistake. I tried {{table1}} but that made no difference. Any ideas?