debug.setmetatable

From Garry's Mod
Jump to: navigation, search
 debug.setmetatable( )

Contents

Description

Sets the object's metatable. Unlike setmetatable, this function works regardless of whether the first object passed is a valid table or not; this function even works on primitive datatypes such as numbers, functions, and even nil.

Arguments

any object

Object to set the metatable for.

Arguments

table metatable

The metatable to set for the object.

If this argument is nil, then the object's metatable is removed.

Returns

boolean

true if the object's metatable was set successfully.
Personal tools
Navigation