I am new to Lua and am having some difficulties:
I am trying to create dynamic variable names:
local tblAlphabet = {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
local count = 0;
for k, v in pairs (tblAlphabet) do
count = count + 1;
[v.."button"] = ui.newButton{ --HOW DO I MAKE THIS WORK? I get syntax error
--some code here
}
You can create a table which contains your variables.
Then you can access
varsvia iterators or direct access (vars.a_button).