summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-08-04 01:10:26 +0100
committerubq323 <ubq323@ubq323.website>2022-08-04 01:10:26 +0100
commit7cfef16a8f2282520da24eea07d1ebe10294c99f (patch)
tree2923541fd0822aa37c69e4ec742e6389892249b8
parentb7be0d0902b092ff1b7e57e7fc819150e85cfd16 (diff)
chat
-rw-r--r--chat.lua9
1 files 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