From 76b32f11cef6d7aff5b6fb49cb05d736aa20929c Mon Sep 17 00:00:00 2001
From: "navid.sassan" <navid.sassan@linuxfabrik.ch>
Date: Thu, 1 Apr 2021 01:00:32 +0200
Subject: [PATCH] improved output

---
 client | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/client b/client
index 4f54308..da6d0fb 100644
--- a/client
+++ b/client
@@ -37,18 +37,21 @@ while true do
             if data[1] == 'eval' then
                 local cmd_fn, err = loadstring(data[2])
                 if not cmd_fn then
-                    print("Compile error:" .. err)
-                    rednet.send(master, "Compile error:" .. err)
+                    print("Compile error: " .. err)
+                    rednet.send(master, "Compile error: " .. err)
                 else
                     local success, output = pcall(cmd_fn)
                     if success then
                         if output then
                             print("Command output: " .. dump(output))
                             rednet.send(master, "Command output: " .. dump(output))
+                        else
+                            print("There is no command output.")
+                            rednet.send(master, "There is no command output.")
                         end
                     else
-                        print("Runtime error:" .. output)
-                        rednet.send(master, "Runtime error:" .. output)
+                        print("Runtime error: " .. output)
+                        rednet.send(master, "Runtime error: " .. output)
                     end
                 end
             end