lua-users home
lua-l archive

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


> What's confusing is beating your head against a wall for half an hour trying
> to figure out why on Earth a function call is raising an error before finally
> finding the answer in Lua's _source code_.

The authoritative answer is given by the manual which says

	setmetatable (table, metatable)
	http://www.lua.org/manual/5.3/manual.html#pdf-setmetatable

Note that the second argument must be present. It is not marked as optional.