deref | Multi Theft Auto: Wiki Skip to content

deref

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function will take a reference obtained by the ref function and returns its Lua element.

Note

This function was originally created to prevent garbage-collection of specific Lua objects/elements which should persist even though no script would reference them. The storage of those references can be obtained by a call to the debug.getregistry function. The ref and deref template can easily be remade using a locally-hidden Lua table and two such function implementations.

Syntax

deref ( )

Code Examples

Script Example Missing

Function deref needs a script example. Help out by writing one.

Contribution guidelines