From 7cfef16a8f2282520da24eea07d1ebe10294c99f Mon Sep 17 00:00:00 2001 From: ubq323 Date: Thu, 4 Aug 2022 01:10:26 +0100 Subject: chat --- chat.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/chat.lua b/chat.lua index b757185..d0e73cc 100644 --- a/chat.lua +++ b/chat.lua @@ -1,5 +1,5 @@ -local p = peripheral.find"manipulator" -assert(p and p.hasModule"plethora:chat") +local man = peripheral.find"manipulator" +assert(man and man.hasModule"plethora:chat") local m = peripheral.wrap"monitor" assert(m) @@ -9,9 +9,9 @@ local function p(...) term.redirect(term.native()) end -local score(msg) +local function score(msg) local s = 0 - for m in a:gmatch"%-?%d+" do s=s+m end + for num in msg:gmatch"%-?%d+" do s=s+num end return s end @@ -22,4 +22,3 @@ while true do end -end -- cgit v1.2.3