Does anyone have a working example? I have been stuck with this forever, its ridiculous…
Graham has been very useful but we are not getting anywhere.
Heres my current code which is probably the 50th attempt
[lua]local tileLayer = wMap:getTileLayer(“Equipment”)
local tiles = tileLayer.tiles
print(1)
for i = 1, #tiles, 1 do
local tile = tiles[i]
local properties = tile:getProperties()
–print(properties) --this prints table references
for k, v in pairs( properties ) do
print( v:getName() … ", " … v:getValue() )
end
–absolutely jack return, and does iterate through all the tiles
for j = 1, #properties, 1 do
print( properties[j]:getName(),properties[j]:getValue() )
end
end[/lua]
Graham did mention the properties table isnt indexed, its name based which ensures no duplicates [import]uid: 63700 topic_id: 13912 reply_id: 313912[/import]