diff options
author | ubq323 <ubq323@ubq323.website> | 2022-08-04 01:10:26 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2022-08-04 01:10:26 +0100 |
commit | 7cfef16a8f2282520da24eea07d1ebe10294c99f (patch) | |
tree | 2923541fd0822aa37c69e4ec742e6389892249b8 | |
parent | b7be0d0902b092ff1b7e57e7fc819150e85cfd16 (diff) |
chat
-rw-r--r-- | chat.lua | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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 |