diff options
author | ubq323 <ubq323@ubq323.website> | 2022-08-04 02:38:34 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2022-08-04 02:38:34 +0100 |
commit | 1877604754293ddfd7b66311ae7628bac8ca8229 (patch) | |
tree | 2b2d600a10a5b47cbf2f6cffc6356d2aa9b11d51 | |
parent | 439ef14de7a5ed1b3dfe2a2a4a139c8a2641b6ad (diff) |
chat
-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 |