I understand how
textutils.unserialize()works, how ever my issue is that, not only do I not know how to pass commands to the lua prompt, but also the problem that when calling
tempvar()it trhows a nill error,
I'm using plethora's chat recorder with the standard script running code but slightly altered to run the lua code entered in chat.
the original plethora's code found here
(It's the third code snippet)
and my code that I'm using-
--[[irrelevant code local function clear() term.clear() term.setCursorPos(1,1) end clear() --]] local chat = peripheral.wrap("right") while true do --message catching local _, player, message, uuid = os.pullEvent("chat_message") --message parsing local tempmsg = string.sub(message,2) tempvar = textutils.unserialize(tempmsg) --debug print(message) print(tempmsg) print(tempvar) --pre edit: print(tempmsg) --atempted function call tempvar() end
With regards
-qwerty
Edited by qwerty, 25 February 2020 - 08:43 AM.