RawGet() ?Oh no, never ever do it like that
Finding out if a table item exists is really easy. Just use the RawGet() function. If it returns Nil, then the table item doesn't exist, e.g.
t = {x = 5, y = 6}
Print(RawGet(t, "x")) --> 5 Print(RawGet(t, "y")) --> 6 Print(RawGet(t, "z")) --> Nil
Yes, that's exactly what I want and I am surprised that this function exists! I was looking for it for ages now
So is the documentation incomplete or am I blind (the latter is definitive possible ?
Aha! Here the documentation for SetLayerStyle() is not very clear, I think. I never had understood the documentation in a way, that I can pass more then one Layer-ID *in this way* as arguments to it (despite the "..." in the parameter list of the function).Just use a loop:
Code: Select all
; move 5 pixels per cycle speed = 5 ; move layers 1 & 2 from 0 to 640 at a variable speed For Local k = 0 To 640 Step speed SetLayerStyle(1, {x = k}, 2, {x = k}) VWait Next
Thanks a lot!
Tom