在Corona SDK中,为什么这个函数会返回一个错误?

当我尝试运行这段代码时,出现了一个错误:main.lua第213行:'}`'在gameView附近处预期。

点赞
用户3974215
用户3974215

原文:

transition.to(gameView, {time = 300, x = -gameView.height,  display.remove() gameView= nil

end})

翻译:

这不是正确的写法,请使用onCompleteonCancel,同时使用display.remove(gameView)而不是display.remove()

transition.to(gameView, {time = 300, x = -gameView.height, onComplete=function()
    display.remove(gameView)
    gameView= nil
end})
2014-10-21 03:38:44