summaryrefslogtreecommitdiff
path: root/chat.lua
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-08-04 02:38:34 +0100
committerubq323 <ubq323@ubq323.website>2022-08-04 02:38:34 +0100
commit1877604754293ddfd7b66311ae7628bac8ca8229 (patch)
tree2b2d600a10a5b47cbf2f6cffc6356d2aa9b11d51 /chat.lua
parent439ef14de7a5ed1b3dfe2a2a4a139c8a2641b6ad (diff)
chat
Diffstat (limited to 'chat.lua')
-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