[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua error?
- From: Lenny Palozzi <domain@...>
- Date: Tue, 19 Sep 2000 01:12:14 -0400
Hello,
I'm trying to get the following code to work but I get "error: attempt to call a table value". The commented line works fine but I don't want to use it because I have to specify the table index.
function a(t) -- table constructor a
return t
end
b = { a{x=1, y=1}, a{x=2, y=2} } -- error
-- b = { [1]=a{x=1, y=1}, [2]=a{x=2, y=2} } -- ok
By accident I found that if 'return t' was instead 'return a', it segfaulted.
Thanks,
-Lenny.