From ce3e5feffb5358ac842d6aab299af066db25cf1b Mon Sep 17 00:00:00 2001 From: scmcgowen Date: Sun, 1 Feb 2026 13:25:34 -0600 Subject: [PATCH] fix bullshit --- prog2/Slot.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/prog2/Slot.lua b/prog2/Slot.lua index 0028b70..be416f6 100644 --- a/prog2/Slot.lua +++ b/prog2/Slot.lua @@ -41,7 +41,15 @@ sleep(0.25) nfc = peripheral.wrap("bottom") ---os.pullEvent=os.pullEventRaw +os.pullEvent= function(...) + while true do + local t = table.pack(os.pullEventRaw(...)) + if t[1] ~= "terminate" then + return table.unpack(t,1,t.n) + end + end +end + if fs.exists("/disk/terminate") then error("Service mode active",2) end @@ -76,7 +84,7 @@ print("what is your bet?") bet = tonumber(io.read()) print("what is your guess 1 to 15?") userGess = tonumber(io.read()) -if not bet or bet > money then +if not bet or bet > money or bet < 0 then print("You do not have enough funds or did not enter a bet.") sleep(3) shell.run("reboot")