Don't use UID use for each:
[code:2o5p8cj4]+ Button: On Button clicked
-> System: Set global variable 'das' to 1
+ System: For each Sprite
-> Array: Set index (global('das'), 1) to Sprite.x
-> System: Add 1 to global variable 'das'[/code:2o5p8cj4]
A UID is assigned to every object (text, sprite, mouse and keyboard, etc...) and every behavior. Say you have a cap with only one "Sprite" with a "drag and drop" behavior. The Sprite will have a UID of 0, and it's behavior "drag and drop" will have a UID of 1. So if you then add another instance of Sprite it's UID will be 2.