diff --git a/minehost.lua b/minehost.lua index 704cdfa..297e12b 100644 --- a/minehost.lua +++ b/minehost.lua @@ -118,7 +118,11 @@ local function listenToMiners() while running do local event, side, sendChannel, replyChannel, serialized, distance = os.pullEvent("modem_message") print("") - local data = textutils.unserialise(serialized) + local data = nil + if not pcall(function() data = textutils.unserialise(serialized) end) then + print("Message already table, not deserializing.") + data = serialized + end if data["token"] == TOKEN and data["recipient"] == HOST then handleMessage(data["sender"], data["type"], data) else