rapidMax
|
  |
| Joined: 13 Jul 2015 |
| Total Posts: 35 |
|
| |
|
|
| 16 Jul 2015 11:01 PM |
| makes it only accessable in that environment (i know its a diff word, brain block) |
|
|
| Report Abuse |
|
|
gooey333
|
  |
| Joined: 24 Mar 2013 |
| Total Posts: 1208 |
|
|
| 16 Jul 2015 11:06 PM |
For example...
local a = 3
if a == 3 then print(a) -- 3 --but local b = 5 end
print(b) -- nil
--outside if you can't print b |
|
|
| Report Abuse |
|
|
|
| 16 Jul 2015 11:08 PM |
local is a variable which is accessible to is environment, how you say "local" to that part of code block
function printthis() local a = "It is very real" print(a) -- It is very real" end
print(a) -- nil |
|
|
| Report Abuse |
|
|
gooey333
|
  |
| Joined: 24 Mar 2013 |
| Total Posts: 1208 |
|
|
| 16 Jul 2015 11:09 PM |
@above
That didn't explain a local variable vs a normal variable |
|
|
| Report Abuse |
|
|
gooey333
|
  |
| Joined: 24 Mar 2013 |
| Total Posts: 1208 |
|
|
| 16 Jul 2015 11:10 PM |
| Well ok it did, but not very clearly |
|
|
| Report Abuse |
|
|