From 86250deba3cbf6e4078b8ef44c22bd8716a589fb Mon Sep 17 00:00:00 2001 From: MayaTheShy Date: Fri, 20 Feb 2026 00:59:19 -0500 Subject: [PATCH] feat: Improve command processing output; list command names instead of serializing the commands table --- turtle.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/turtle.lua b/turtle.lua index 6a9528b..f0c1c67 100644 --- a/turtle.lua +++ b/turtle.lua @@ -913,7 +913,13 @@ local function processMessage(message) if message.command then print(" Command: " .. message.command) - print(" Available handlers: " .. textutils.serialize(table.keys or function(t) local k={} for n in pairs(t) do table.insert(k,n) end return k end)(commands)) + -- Don't try to serialize the commands table - it contains functions! + -- Just list the command names + local availableCommands = {} + for cmdName, _ in pairs(commands) do + table.insert(availableCommands, cmdName) + end + print(" Available handlers: " .. table.concat(availableCommands, ", ")) local handler = commands[message.command] if handler then