سؤال

So if my score is higher than 5 then gotoSceneA elseif gotoSceneB.
But I am getting this error:

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

If i remove the .. I get:

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

My code:

if .. score > 5 then
    storyboard.gotoScene("bonus", "fade", 400)
elseif
    storyboard.gotoScene("gameover", "fade", 400)
end
end
هل كانت مفيدة؟

المحلول

if score > 1000 then
    storyboard.gotoScene("bonus", "fade", 400)
else
    storyboard.gotoScene("gameover", "fade", 400)
end
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top