fix: handle invocation when no turtles are available

This commit is contained in:
2025-05-08 20:36:20 -03:00
parent 3b0555abd0
commit d72ca4a727
+5
View File
@@ -340,6 +340,11 @@ end
registerConsoleCommand("clear", clearCommand) registerConsoleCommand("clear", clearCommand)
function turtlesCommand() function turtlesCommand()
if #turtles == 0 then
log.info("no turtles registered")
return
end
for i=0, #turtles, 1 do for i=0, #turtles, 1 do
local turt = turtles[i] local turt = turtles[i]