View Single Post
06-25-18, 07:07 PM   #8
seyan777
An Aku'mai Servant
Join Date: Feb 2017
Posts: 35
Originally Posted by myrroddin View Post
The full implementation of Lua might, I don't know, and haven't checked. However, in WoW, we do not get the full Lua implementation. As one example, we have no access to i/o for obvious security reasons.

It might help to know what you are trying to accomplish.
Ah... I see...

Thanks for letting me know!

Originally Posted by Rilgamon View Post
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
damn! didn't even think of using do-end within a function lel!

Originally Posted by Seerah View Post
Yeah, I've already read the document, but it still didn't ease my curiosity whether you could still change the value of outer one even if you declare the same named variable within a function (or loops, do-end, etc.) or not
  Reply With Quote