View Single Post
06-25-18, 03:47 PM   #6
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
do-end-blocks create a scope, too. This way you can change the outer testVar.
Lua Code:
  1. function testFunc()
  2.  
  3. do
  4.     local testVar = testVar;
  5.  
  6.     print(testVar);
  7. end
  8.  
  9.     testVar = 2;
  10. end
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote