Quantcast LoTROInterface - View Single Post - Lua Beginner has some questions
View Single Post
Unread 06-15-2016, 03:43 PM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
Join Date: Oct 2010
Posts: 270
I would recommend reading up on variable scoping. A simple tutorial specific to Lua can be found at:

iirc that tutorial does leave out one important thing, iterators are always local, for instance, in the line
"for k,v in pairs(test) do"
the variables k and v are automatically local to their iterative loop (you don't need to explicitly create them as local variables first).

Last edited by Garan : 06-15-2016 at 03:53 PM.
Reply With Quote