diff options
-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 |