Thank you both. I’ve actually gotten the message by doing both things at various times. Missing end statement will do it. Also too many external local references.
One easy way to fix the second case which occurs I’m guessing with Lua newbies like me is to look at the following case.
My original code:
local var1 = 12
local var2 = {}
local var3 = “text”
So 3 external locals. This can be replaced by this.
local table = {}
table.var1 = 1
table.var2 = {}
table.var3 = “text”
So now it is one external local. It actually makes sense to “group” the variables according to function for clarity.
So perhaps you have a bunch of ui variables.
local ui = {}
ui.box = {}
ui.circle = {}
Hope this helps someone else new to Lua.
Thanks all,
-Dennis
[import]uid: 108253 topic_id: 19322 reply_id: 75718[/import]