fix: handle invocation when no turtles are available
This commit is contained in:
@@ -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]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user