Hello,
i have a question: how to get x and y coordinates from a table randomly? i tried this, but its get me an error for y property
[lua]local coords = { {x=38,y=265}, {x=38,y=345}, {x=38,y=425} }
local function return_random()
local ranX, ranY
for i=1, math.random(1,#coords) do
ranX,ranY = coords[i]
end
return ranX,ranY
end
local a1 = display.newText (“TEXT”, 0,0, native.systemFont, 16)
a1.x,a1.y = return_random()[/lua]
any help is appreciated, as always) [import]uid: 16142 topic_id: 17652 reply_id: 317652[/import]