ref | Multi Theft Auto: Wiki Skip to content

ref

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 create a reference to the given argument.

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. Since at the moment MTA does not make use of advanced garbage-collector semantics, this function serves little purpose other than leak memory!

Syntax

ref ( )

Code Examples

Script Example Missing

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

Contribution guidelines