From 61a4812a8ea9c287863a034dd14e75469edeb993 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Thu, 29 Dec 2022 20:22:30 +0000 Subject: shop --- shop.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shop.lua b/shop.lua index 2d2973e..ad6e425 100644 --- a/shop.lua +++ b/shop.lua @@ -4,8 +4,10 @@ assert(sres.ok,"not ok") ws = assert(http.websocket(sres.url)) while true do - c=textutils.unserializeJSON(assert((ws.receive()))) + msgtxt = assert(ws.receive(),"ws error") + msg = textutils.unserializeJSON(msgtxt) print(c.type) + if c.type ~= "keepalive" then print(msgtxt) end end -- cgit v1.2.3