Hi, is there a way to get he ID of a display object?
When I print the object to the terminal, it shows something like
table: 0x4bc8d0
I just want to get the “0x4bc8d0” as a string
thanks
[import]uid: 49842 topic_id: 10732 reply_id: 310732[/import]
Maybe something like: tableString = tostring(myObject) [import]uid: 48658 topic_id: 10732 reply_id: 38938[/import]
thanks for the quick reply Tim!
I’m so dumb [import]uid: 49842 topic_id: 10732 reply_id: 38940[/import]
No problem, if you want a human readable string rather than the table string, you could name the object like:
local myRectangle = display.newRect(0, 0, 150, 50)
myRectangle.name = "myName"
print(myRectangle.name)
[import]uid: 48658 topic_id: 10732 reply_id: 38942[/import]