View Single Post
06-24-18, 08:16 PM   #3
seyan777
An Aku'mai Servant
Join Date: Feb 2017
Posts: 35
Originally Posted by p3lim View Post
Variables are values of places in memory, when you create a new local variable inside that function, that is an entirely new memory position the value is stored in.

Every time you run that function the local variable is created anew, and will get the "latest" from the global variable (there's no static variables in Lua).

The only reason you'd want to differentiate the variable naming in a scenario like this is to avoid confusion, nothing more.
Hi p3lim,

So, Lua doesn't have an ability to access to an address of variable, does it?
(Like that is in C++ and so on)
  Reply With Quote