What am i doing wrong here?:
[lua]currentLevel = 1
local level1 = display.newRect(0,0,50,50);
local function move()
levToMove = tostring(“level”…currentLevel)
print(levToMove) -------------------- transition.to(levToMove,{x=50, time=0})
end[/lua]
I want to move the object, but it’s not working. I am trying to do it this way so when the “currentLevel” increases the function will work with the next level too. [import]uid: 7850 topic_id: 8544 reply_id: 308544[/import]