i created a table that is setup like this
[blockcode]
function fnPopulateBoard()
for ct = 1, 9, 1 do
for ct2 = 1, 7, 1 do
gameBoard[ct][ct2] = math.random(level+2)
end
end
end
[/blockcode]
the table is created in another function and this one just fills it with random values
this is the code to select two different gamePeices
[blockcode]
function fnSelect(event)
print(event.target)
if touch1 ~= nil then
if touch1 == event.target then
touch1 = nil
selected1 = nil
else
selected2 = event.target
print(selected1)
print(selected2)
touch1 = nil
fnSwap()
end
return
end
if touch1 == nil then
touch1 = event.target
selected1 = event.target
end
end
[/blockcode]
this gives me the memory location of the two objects now i need to know how to swap the value in each location [import]uid: 7911 topic_id: 4808 reply_id: 304808[/import]