Talk:Scripting Tips

From Multi Theft Auto: Wiki
Revision as of 05:06, 1 August 2014 by Braunson (talk | contribs) (Information about confusion with scripting tips. This should be easy for new users to read and understand.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Unclear information. Recently asked on MTA:SA forums.

If your script is covered in isTimer and isElement checks to hide debug warnings from deleted elements not being dereferenced (making the variable nil) you will regret it when that element ID or timer pointer has to be re-used by MTA in a weeks time and your script starts acting strangely and you won't have a clue why. Dereference destroyed elements and disconnected players!

Forum Thread

Text:

I saw this tip on this page on the wiki today:

If your script is covered in isTimer and isElement checks to hide debug warnings from deleted elements not being dereferenced (making the variable nil) you will regret it when that element ID or timer pointer has to be re-used by MTA in a weeks time and your script starts acting strangely and you won't have a clue why. Dereference destroyed elements and disconnected players!


https://wiki.multitheftauto.com/wiki/Scripting_Tips

I'm just confused by what it means when it says the element has to be re-used by MTA in a a weeks time.. I'm not sure what it means to be 100% honest. Can anyone explain to mean what that means? I would appreciate it. Thanks!