diff options
-rw-r--r-- | chat.lua | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -50,13 +50,15 @@ local function draw_lb(W,scores) end table.sort(thescores,function(a,b) return a.score < b.score end) for i=1,10 do + if not thescores[i] then break end + local name,score = thescores[i].name, thescores[i].score -- name W.setTextColor(colors.white) W.setCursorPos(5,i+1) W.write(name) -- score - W.setTextColor(colors.blue) + W.setTextColor(colors.red) W.setCursorPos(w-scorewidth,i+1) W.write(pad_r(score,scorewidth)) end |