【发布时间】:2017-05-29 20:07:10
【问题描述】:
我的排行榜有问题,问题是我的数组分数都按升序排序并且工作正常,但我无法保存分数旁边的文本?情况是game.lua --> gameOver(Score & Difficulty Text) --> leaderboards(Score)。从表中调用变量不起作用。
排行榜.lua
for i = 1, 10 do
if (scoresTable[i]) then
local yPos = 150 + (i * 130)
local thisScore = display.newText(sceneGroup, scoresTable[i].. options.title,display.contentCenterX-30, yPos, font, 100)
thisScore.anchorX = 0
end
end
game.lua
options{
title = "Easy",
}
gameover.lua
options{
title = options.title,
}
【问题讨论】:
-
你的意思是把玩家的名字保存到
leaderboard变量吗? -
错字意味着困难..
-
如果有错别字,请编辑您的问题并修正它。
-
不清楚你想要什么。你的问题或问题是什么?错误信息是什么? “从表中调用变量不起作用”是什么意思请阅读How to Ask
标签: arrays variables lua coronasdk lua-table