Garry's Mod Wiki

Revision Difference

light_userdata#548590

<cat>Dev.Lua</cat>⤶ Userdata is a type primarily used in the Lua C API. The userdata points to data in C, such as an object. There are two types of userdata: full userdata and light userdata. The word "userdata" alone implies full userdata. See also <page>userdata</page>.⤶ ⤶ Light userdata represents a pointer as a value in Lua. Unlike full userdata, light userdata is not garbage collected, has no individual metatable, and is only equal to other light userdata when the pointers they hold are equal. This is not inherently used in Garry's Mod.⤶ ⤶ See the [Programming in Lua documentation](https://www.lua.org/pil/28.5.html) for more information.