So apparently when you declare a variable in Lua, its globally scoped and needs a hash lookup to be accessed *unless* you declare it as a local, even if its in a block. Sort of the opposite of every single other language on the planet. So I spent the night rewriting over 2000 lines of code to locally scope everything. Yep.
|