There are three main reasons for doing so: msg cecho ( transformed_msg ) end - better function myEcho ( msg ) local transformed_msg = "(Highlighter)". bad function myEcho ( msg ) transformed_msg = "(Highlighter)". If you will need to access it repeatedly in your script, make it local first.Īlways be asking yourself, "Could I be using a local instead?" If a variable is only needed for the duration of a function, alias, or trigger, then make it a local every time. You should really be using local variables wherever you can.
0 Comments
Leave a Reply. |