Hi guys,
Help me out here.
When I write for loop inside a function I have to do
for i = 1, #elements do
– code here
But when I do
for i = 1, elements.numChildren do
– I get an error “for loop element must be a number”.
When I print elements.numChildren value I get “nil”.
I do not get why, because elements group is declared at top of main.lua with word “local”, so it should be accessed within all functions (it is not local to any function)?
Many thanks.
Ivan
Guys, Roaminggamer rocks!