Hi
i got function that called when game is done, looks like this
function gameresult() local result = display.newImage('images/result.png') result:setReferencePoint(display.BottomLeftReferencePoint) result.x = 0 result.y = 320 function result:tap() --or result:touch storyboard.gotoScene( "nextlevel" ) end result:addEventListener("tap",result) end
its suppose work like this
game playing - game done - show image result (called function gameresult) - the image that show up from gameresult function, when i click it, goes to the next scene/level
but when i click it its nothing happen, and when i put that 2nd function outside the 1st function like this
function gameresult() local result = display.newImage('images/result.png') result:setReferencePoint(display.BottomLeftReferencePoint) result.x = 0 result.y = 320 end function result:tap() --or result:touch storyboard.gotoScene( "nextlevel" ) end result:addEventListener("tap",result)
it error with something about “nil” value
anyone can help me? thank you

