如果得分高于5那么

时间:2013-09-15 16:56:20

标签: lua corona corona-storyboard

因此,如果我的分数高于5,那么gotoSceneA elseif gotoSceneB 但是我收到了这个错误:

game.lua:439: unexpected symbol near '..'*

如果我删除..我得到:

game.lua:443: 'then' expected near 'end'

我的代码:

if .. score > 5 then
    storyboard.gotoScene("bonus", "fade", 400)
elseif
    storyboard.gotoScene("gameover", "fade", 400)
end
end

1 个答案:

答案 0 :(得分:3)

        if score > 1000 then
           storyboard.gotoScene("bonus", "fade", 400)
           else
           storyboard.gotoScene("gameover", "fade", 400)
        end