Originally Posted by Edda
Just tried your example and it worked perfectly !
I didn't know at all about this way of instancing a function's return values.
I honestly thought var = MyElement:GetAnchor(MyElement.anchorIndex) would instance a table/array into 'var' that you could access via offsetx = var.offsetX
Looks like I was wrong
So - another thumbs up and and hats down for you
|
In lua you are doing the kind of the opposite. You are taking an array return and unpacking it to the individual variables to access. If you don't catch them all, they are just tossed away. That is why you only had the first return value on the initial attempt to use it.
I'll have to look at your index question when I get home. I thought is was an integer reference.