Properly handle command not found

This commit is contained in:
osmarks 2018-08-13 07:50:23 +01:00
parent 9c15785c70
commit 93a2f95330

View File

@ -64,8 +64,8 @@ while true do
end
if not fn then
print("Command", command, "not found.")
else
local ok, result = pcall(fn, table.unpack(args))
if result then textutils.pagedPrint(result) end
end
local ok, result = pcall(fn, table.unpack(args))
if result then textutils.pagedPrint(result) end
end