summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chat.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/chat.lua b/chat.lua
index d91e45d..9e02b1e 100644
--- a/chat.lua
+++ b/chat.lua
@@ -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