setmetatable()

setmetatable (table, metatable)

Sets the metatable for the given table. (To change the metatable of other types from Lua code, you must use the debug library (§6.10).) If metatable is nil, removes the metatable of the given table. If the original metatable has a __metatable field, raises an error.

This function returns table.

doc_lua
2017-02-21 04:15:53
Comments
Leave a Comment

Please login to continue.