Index: /code/branches/consolecommands3/src/libraries/core/CommandEvaluation.cc
===================================================================
--- /code/branches/consolecommands3/src/libraries/core/CommandEvaluation.cc	(revision 7188)
+++ /code/branches/consolecommands3/src/libraries/core/CommandEvaluation.cc	(revision 7189)
@@ -74,12 +74,23 @@
     bool CommandEvaluation::execute() const
     {
+        bool success;
+        this->query(&success);
+        return success;
+    }
+
+    MultiType CommandEvaluation::query(bool* success) const
+    {
+        if (success)
+            *success = false;
+
         if (!this->isValid())
-            return false;
+            return MT_Type::Null;
 
         if (this->bEvaluatedParams_ && this->function_)
         {
+            if (success)
+                *success = true;
             COUT(6) << "CE_execute (evaluation): " << this->function_->getName() << ' ' << this->param_[0] << ' ' << this->param_[1] << ' ' << this->param_[2] << ' ' << this->param_[3] << ' ' << this->param_[4] << std::endl;
-            (*this->function_)(this->param_[0], this->param_[1], this->param_[2], this->param_[3], this->param_[4]);
-            return true;
+            return (*this->function_)(this->param_[0], this->param_[1], this->param_[2], this->param_[3], this->param_[4]);
         }
 
@@ -90,10 +101,10 @@
             unsigned int startindex = this->getStartindex();
             if (this->commandTokens_.size() > startindex)
-                return this->function_->parse(removeSlashes(this->commandTokens_.subSet(startindex).join() + this->getAdditionalParameter()));
+                return this->function_->parse(removeSlashes(this->commandTokens_.subSet(startindex).join() + this->getAdditionalParameter()), success);
             else
-                return this->function_->parse(removeSlashes(this->additionalParameter_));
-        }
-
-        return false;
+                return this->function_->parse(removeSlashes(this->additionalParameter_), success);
+        }
+
+        return MT_Type::Null;
     }
 
@@ -233,21 +244,4 @@
     }
 
-    bool CommandEvaluation::hasReturnvalue() const
-    {
-        if (this->function_)
-            return this->function_->hasReturnvalue();
-
-        return MT_Type::Null;
-    }
-
-    MultiType CommandEvaluation::getReturnvalue() const
-    {
-        if (this->function_)
-            return this->function_->getReturnvalue();
-
-        return MultiType();
-    }
-
-
     unsigned int CommandEvaluation::getStartindex() const
     {
Index: /code/branches/consolecommands3/src/libraries/core/CommandEvaluation.h
===================================================================
--- /code/branches/consolecommands3/src/libraries/core/CommandEvaluation.h	(revision 7188)
+++ /code/branches/consolecommands3/src/libraries/core/CommandEvaluation.h	(revision 7189)
@@ -66,4 +66,6 @@
 
             bool execute() const;
+            MultiType query(bool* success = 0) const;
+
             const std::string& complete();
             std::string hint() const;
@@ -86,7 +88,4 @@
             void setEvaluatedParameter(unsigned int index, MultiType param);
             MultiType getEvaluatedParameter(unsigned int index) const;
-
-            bool hasReturnvalue() const;
-            MultiType getReturnvalue() const;
 
         private:
Index: /code/branches/consolecommands3/src/libraries/core/CommandExecutor.cc
===================================================================
--- /code/branches/consolecommands3/src/libraries/core/CommandExecutor.cc	(revision 7188)
+++ /code/branches/consolecommands3/src/libraries/core/CommandExecutor.cc	(revision 7189)
@@ -104,18 +104,40 @@
     {
         if (useTcl)
-            return TclBind::eval(command);
-
-        CommandExecutor::parseIfNeeded(command);
-        return CommandExecutor::getEvaluation().execute();
-    }
-
-    MultiType CommandExecutor::getReturnValue()
-    {
-        return CommandExecutor::getEvaluation().getReturnvalue();
-    }
-
-    std::string CommandExecutor::getReturnValueString()
-    {
-        return CommandExecutor::getEvaluation().getReturnvalue().getString();
+        {
+            bool success;
+            TclBind::eval(command, &success);
+            return success;
+        }
+        else
+        {
+            CommandExecutor::parseIfNeeded(command);
+            return CommandExecutor::getEvaluation().execute();
+        }
+    }
+
+    MultiType CommandExecutor::queryMT(const std::string& command, bool* success, bool useTcl)
+    {
+        if (useTcl)
+        {
+            return TclBind::eval(command, success);
+        }
+        else
+        {
+            CommandExecutor::parseIfNeeded(command);
+            return CommandExecutor::getEvaluation().query(success);
+        }
+    }
+
+    std::string CommandExecutor::query(const std::string& command, bool* success, bool useTcl)
+    {
+        if (useTcl)
+        {
+            return TclBind::eval(command, success);
+        }
+        else
+        {
+            CommandExecutor::parseIfNeeded(command);
+            return CommandExecutor::getEvaluation().query(success).getString();
+        }
     }
 
Index: /code/branches/consolecommands3/src/libraries/core/CommandExecutor.h
===================================================================
--- /code/branches/consolecommands3/src/libraries/core/CommandExecutor.h	(revision 7188)
+++ /code/branches/consolecommands3/src/libraries/core/CommandExecutor.h	(revision 7189)
@@ -47,6 +47,7 @@
         public:
             static bool execute(const std::string& command, bool useTcl = true); // tolua_export
-            static MultiType getReturnValue();
-            static std::string getReturnValueString(); // tolua_export
+
+            static MultiType queryMT(const std::string& command, bool* success = 0, bool useTcl = true);
+            static std::string query(const std::string& command, bool* success = 0, bool useTcl = true); // tolua_export
 
             static std::string complete(const std::string& command);
Index: /code/branches/consolecommands3/src/libraries/core/Executor.cc
===================================================================
--- /code/branches/consolecommands3/src/libraries/core/Executor.cc	(revision 7188)
+++ /code/branches/consolecommands3/src/libraries/core/Executor.cc	(revision 7189)
@@ -50,6 +50,9 @@
     }
 
-    bool Executor::parse(const std::string& params, const std::string& delimiter) const
-    {
+    MultiType Executor::parse(const std::string& params, bool* success, const std::string& delimiter) const
+    {
+        if (success)
+            *success = true;
+
         unsigned int paramCount = this->functor_->getParamCount();
 
@@ -57,5 +60,5 @@
         {
             COUT(5) << "Calling Executor " << this->name_ << " through parser without parameters." << std::endl;
-            (*this->functor_)();
+            return (*this->functor_)();
         }
         else if (paramCount == 1)
@@ -65,15 +68,17 @@
             {
                 COUT(5) << "Calling Executor " << this->name_ << " through parser with one parameter, using whole string: " << params << std::endl;
-                (*this->functor_)(MultiType(params));
+                return (*this->functor_)(MultiType(params));
             }
             else if (!this->defaultValue_[0].null())
             {
                 COUT(5) << "Calling Executor " << this->name_ << " through parser with one parameter, using default value: " << this->defaultValue_[0] << std::endl;
-                (*this->functor_)(this->defaultValue_[0]);
+                return (*this->functor_)(this->defaultValue_[0]);
             }
             else
             {
                 COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given (input: " << temp << ")." << std::endl;
-                return false;
+                if (success)
+                    *success = false;
+                return MT_Type::Null;
             }
         }
@@ -87,5 +92,7 @@
                 {
                     COUT(2) << "Warning: Can't call executor " << this->name_ << " through parser: Not enough parameters or default values given (input:" << params << ")." << std::endl;
-                    return false;
+                    if (success)
+                        *success = false;
+                    return MT_Type::Null;
                 }
             }
@@ -120,19 +127,15 @@
             {
                 case 2:
-                    (*this->functor_)(param[0], param[1]);
-                    break;
+                    return (*this->functor_)(param[0], param[1]);
                 case 3:
-                    (*this->functor_)(param[0], param[1], param[2]);
-                    break;
+                    return (*this->functor_)(param[0], param[1], param[2]);
                 case 4:
-                    (*this->functor_)(param[0], param[1], param[2], param[3]);
-                    break;
+                    return (*this->functor_)(param[0], param[1], param[2], param[3]);
                 case 5:
-                    (*this->functor_)(param[0], param[1], param[2], param[3], param[4]);
-                    break;
-            }
-        }
-
-        return true;
+                    return (*this->functor_)(param[0], param[1], param[2], param[3], param[4]);
+            }
+        }
+
+        return MT_Type::Null;
     }
 
Index: /code/branches/consolecommands3/src/libraries/core/Executor.h
===================================================================
--- /code/branches/consolecommands3/src/libraries/core/Executor.h	(revision 7188)
+++ /code/branches/consolecommands3/src/libraries/core/Executor.h	(revision 7189)
@@ -45,18 +45,18 @@
             virtual ~Executor();
 
-            inline void operator()() const
-                { (*this->functor_)(this->defaultValue_[0], this->defaultValue_[1], this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
-            inline void operator()(const MultiType& param1) const
-                { (*this->functor_)(param1, this->defaultValue_[1], this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
-            inline void operator()(const MultiType& param1, const MultiType& param2) const
-                { (*this->functor_)(param1, param2, this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
-            inline void operator()(const MultiType& param1, const MultiType& param2, const MultiType& param3) const
-                { (*this->functor_)(param1, param2, param3, this->defaultValue_[3], this->defaultValue_[4]); }
-            inline void operator()(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4) const
-                { (*this->functor_)(param1, param2, param3, param4, this->defaultValue_[4]); }
-            inline void operator()(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) const
-                { (*this->functor_)(param1, param2, param3, param4, param5); }
-
-            bool parse(const std::string& params, const std::string& delimiter = " ") const;
+            inline MultiType operator()() const
+                { return (*this->functor_)(this->defaultValue_[0], this->defaultValue_[1], this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
+            inline MultiType operator()(const MultiType& param1) const
+                { return (*this->functor_)(param1, this->defaultValue_[1], this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
+            inline MultiType operator()(const MultiType& param1, const MultiType& param2) const
+                { return (*this->functor_)(param1, param2, this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
+            inline MultiType operator()(const MultiType& param1, const MultiType& param2, const MultiType& param3) const
+                { return (*this->functor_)(param1, param2, param3, this->defaultValue_[3], this->defaultValue_[4]); }
+            inline MultiType operator()(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4) const
+                { return (*this->functor_)(param1, param2, param3, param4, this->defaultValue_[4]); }
+            inline MultiType operator()(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) const
+                { return (*this->functor_)(param1, param2, param3, param4, param5); }
+
+            MultiType parse(const std::string& params, bool* success = 0, const std::string& delimiter = " ") const;
 
             bool evaluate(const std::string& params, MultiType param[5], const std::string& delimiter = " ") const;
@@ -70,6 +70,4 @@
             inline Functor::Type::Enum getType() const
                 { return this->functor_->getType(); }
-            inline const MultiType& getReturnvalue() const
-                { return this->functor_->getReturnvalue(); }
             inline std::string getTypenameParam(unsigned int param) const
                 { return this->functor_->getTypenameParam(param); }
@@ -128,30 +126,30 @@
             using Executor::operator();
 
-            inline void operator()(T* object) const
-                { (*((FunctorMember<T>*)this->functor_))(object, this->defaultValue_[0], this->defaultValue_[1], this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
-            inline void operator()(T* object, const MultiType& param1) const
-                { (*((FunctorMember<T>*)this->functor_))(object, param1, this->defaultValue_[1], this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
-            inline void operator()(T* object, const MultiType& param1, const MultiType& param2) const
-                { (*((FunctorMember<T>*)this->functor_))(object, param1, param2, this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
-            inline void operator()(T* object, const MultiType& param1, const MultiType& param2, const MultiType& param3) const
-                { (*((FunctorMember<T>*)this->functor_))(object, param1, param2, param3, this->defaultValue_[3], this->defaultValue_[4]); }
-            inline void operator()(T* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4) const
-                { (*((FunctorMember<T>*)this->functor_))(object, param1, param2, param3, param4, this->defaultValue_[4]); }
-            inline void operator()(T* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) const
-                { (*((FunctorMember<T>*)this->functor_))(object, param1, param2, param3, param4, param5); }
-
-
-            inline void operator()(const T* object) const
-                { (*((FunctorMember<T>*)this->functor_))(object, this->defaultValue_[0], this->defaultValue_[1], this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
-            inline void operator()(const T* object, const MultiType& param1) const
-                { (*((FunctorMember<T>*)this->functor_))(object, param1, this->defaultValue_[1], this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
-            inline void operator()(const T* object, const MultiType& param1, const MultiType& param2) const
-                { (*((FunctorMember<T>*)this->functor_))(object, param1, param2, this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
-            inline void operator()(const T* object, const MultiType& param1, const MultiType& param2, const MultiType& param3) const
-                { (*((FunctorMember<T>*)this->functor_))(object, param1, param2, param3, this->defaultValue_[3], this->defaultValue_[4]); }
-            inline void operator()(const T* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4) const
-                { (*((FunctorMember<T>*)this->functor_))(object, param1, param2, param3, param4, this->defaultValue_[4]); }
-            inline void operator()(const T* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) const
-                { (*((FunctorMember<T>*)this->functor_))(object, param1, param2, param3, param4, param5); }
+            inline MultiType operator()(T* object) const
+                { return (*((FunctorMember<T>*)this->functor_))(object, this->defaultValue_[0], this->defaultValue_[1], this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
+            inline MultiType operator()(T* object, const MultiType& param1) const
+                { return (*((FunctorMember<T>*)this->functor_))(object, param1, this->defaultValue_[1], this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
+            inline MultiType operator()(T* object, const MultiType& param1, const MultiType& param2) const
+                { return (*((FunctorMember<T>*)this->functor_))(object, param1, param2, this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
+            inline MultiType operator()(T* object, const MultiType& param1, const MultiType& param2, const MultiType& param3) const
+                { return (*((FunctorMember<T>*)this->functor_))(object, param1, param2, param3, this->defaultValue_[3], this->defaultValue_[4]); }
+            inline MultiType operator()(T* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4) const
+                { return (*((FunctorMember<T>*)this->functor_))(object, param1, param2, param3, param4, this->defaultValue_[4]); }
+            inline MultiType operator()(T* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) const
+                { return (*((FunctorMember<T>*)this->functor_))(object, param1, param2, param3, param4, param5); }
+
+
+            inline MultiType operator()(const T* object) const
+                { return (*((FunctorMember<T>*)this->functor_))(object, this->defaultValue_[0], this->defaultValue_[1], this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
+            inline MultiType operator()(const T* object, const MultiType& param1) const
+                { return (*((FunctorMember<T>*)this->functor_))(object, param1, this->defaultValue_[1], this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
+            inline MultiType operator()(const T* object, const MultiType& param1, const MultiType& param2) const
+                { return (*((FunctorMember<T>*)this->functor_))(object, param1, param2, this->defaultValue_[2], this->defaultValue_[3], this->defaultValue_[4]); }
+            inline MultiType operator()(const T* object, const MultiType& param1, const MultiType& param2, const MultiType& param3) const
+                { return (*((FunctorMember<T>*)this->functor_))(object, param1, param2, param3, this->defaultValue_[3], this->defaultValue_[4]); }
+            inline MultiType operator()(const T* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4) const
+                { return (*((FunctorMember<T>*)this->functor_))(object, param1, param2, param3, param4, this->defaultValue_[4]); }
+            inline MultiType operator()(const T* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) const
+                { return (*((FunctorMember<T>*)this->functor_))(object, param1, param2, param3, param4, param5); }
 
             inline void setObject(T* object) const
@@ -162,5 +160,5 @@
             using Executor::parse;
 
-            bool parse(T* object, const std::string& params, const std::string& delimiter = " ") const
+            MultiType parse(T* object, const std::string& params, bool* success = 0, const std::string& delimiter = " ") const
             {
                 FunctorMember<T>* functorMember = static_cast<FunctorMember<T>*>(this->functor_);
@@ -169,5 +167,5 @@
 
                 functorMember->setObject(object);
-                bool result = Executor::parse(params, delimiter);
+                const MultiType& result = Executor::parse(params, success, delimiter);
                 functorMember->setObjects(objects);
 
@@ -175,5 +173,5 @@
             }
 
-            bool parse(const T* object, const std::string& params, const std::string& delimiter = " ") const
+            MultiType parse(const T* object, const std::string& params, bool* success = 0, const std::string& delimiter = " ") const
             {
                 FunctorMember<T>* functorMember = static_cast<FunctorMember<T>*>(this->functor_);
@@ -182,5 +180,5 @@
 
                 functorMember->setObject(object);
-                bool result = Executor::parse(params, delimiter);
+                const MultiType& result = Executor::parse(params, success, delimiter);
                 functorMember->setObjects(objects);
 
Index: /code/branches/consolecommands3/src/libraries/core/Functor.h
===================================================================
--- /code/branches/consolecommands3/src/libraries/core/Functor.h	(revision 7188)
+++ /code/branches/consolecommands3/src/libraries/core/Functor.h	(revision 7189)
@@ -104,7 +104,5 @@
             virtual ~Functor() {}
 
-            virtual void operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0;
-
-            inline const MultiType& getReturnvalue() const { return this->returnedValue_; }
+            virtual MultiType operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0;
 
             virtual Type::Enum getType() const = 0;
@@ -121,7 +119,4 @@
 
             virtual const std::type_info& getHeaderIdentifier() const = 0;
-
-        protected:
-            MultiType returnedValue_;
     };
 
@@ -130,5 +125,5 @@
         public:
             virtual ~FunctorStatic() {}
-            virtual void operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0;
+            virtual MultiType operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0;
     };
 
@@ -144,17 +139,18 @@
             virtual ~FunctorMember() {}
 
-            virtual void operator()(T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0;
-            virtual void operator()(const T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0;
-
-            virtual void operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null)
+            virtual MultiType operator()(T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0;
+            virtual MultiType operator()(const T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0;
+
+            virtual MultiType operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null)
             {
                 if (this->object_)
-                    (*this)(this->object_, param1, param2, param3, param4, param5);
+                    return (*this)(this->object_, param1, param2, param3, param4, param5);
                 else if (this->constObject_)
-                    (*this)(this->constObject_, param1, param2, param3, param4, param5);
+                    return (*this)(this->constObject_, param1, param2, param3, param4, param5);
                 else
                 {
                     COUT(1) << "An error occurred in Functor.h:" << std::endl;
                     COUT(1) << "Error: No object set." << std::endl;
+                    return MT_Type::Null;
                 }
             }
@@ -340,6 +336,6 @@
 
 #define FUNCTOR_STORE_RETURNVALUE(returnvalue, functioncall) FUNCTOR_STORE_RETURNVALUE##returnvalue(functioncall)
-#define FUNCTOR_STORE_RETURNVALUE0(functioncall) functioncall
-#define FUNCTOR_STORE_RETURNVALUE1(functioncall) this->returnedValue_ = functioncall
+#define FUNCTOR_STORE_RETURNVALUE0(functioncall) functioncall; return MT_Type::Null
+#define FUNCTOR_STORE_RETURNVALUE1(functioncall) return functioncall
 
 
@@ -395,5 +391,5 @@
             } \
     \
-            void operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) \
+            MultiType operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) \
             { \
                 FUNCTOR_STORE_RETURNVALUE(returnvalue, (*this->functionPointer_)(FUNCTOR_FUNCTION_CALL(numparams))); \
@@ -441,13 +437,14 @@
             } \
     \
-            void operator()(T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) \
+            MultiType operator()(T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) \
             { \
                 FUNCTOR_STORE_RETURNVALUE(returnvalue, (*object.*this->functionPointer_)(FUNCTOR_FUNCTION_CALL(numparams))); \
             } \
     \
-            void operator()(const T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) \
+            MultiType operator()(const T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) \
             { \
                 COUT(1) << "An error occurred in Functor.h:" << std::endl; \
                 COUT(1) << "Error: Function is not const." << std::endl; \
+                return MT_Type::Null; \
             } \
     \
@@ -482,10 +479,10 @@
             } \
     \
-            void operator()(T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) \
+            MultiType operator()(T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) \
             { \
                 FUNCTOR_STORE_RETURNVALUE(returnvalue, (*object.*this->functionPointer_)(FUNCTOR_FUNCTION_CALL(numparams))); \
             } \
     \
-            void operator()(const T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) \
+            MultiType operator()(const T* object, const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) \
             { \
                 FUNCTOR_STORE_RETURNVALUE(returnvalue, (*object.*this->functionPointer_)(FUNCTOR_FUNCTION_CALL(numparams))); \
Index: /code/branches/consolecommands3/src/libraries/core/LuaState.cc
===================================================================
--- /code/branches/consolecommands3/src/libraries/core/LuaState.cc	(revision 7188)
+++ /code/branches/consolecommands3/src/libraries/core/LuaState.cc	(revision 7189)
@@ -370,7 +370,8 @@
     }
 
-    void LuaFunctor::operator()(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5)
+    MultiType LuaFunctor::operator()(const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5)
     {
         lua_->doString(this->code_);
+        return MT_Type::Null;
     }
 }
Index: /code/branches/consolecommands3/src/libraries/core/LuaState.h
===================================================================
--- /code/branches/consolecommands3/src/libraries/core/LuaState.h	(revision 7188)
+++ /code/branches/consolecommands3/src/libraries/core/LuaState.h	(revision 7189)
@@ -52,5 +52,5 @@
         public:
             LuaFunctor(const std::string& code, LuaState* luaState);
-            void operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null);
+            MultiType operator()(const MultiType& param1 = MT_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null);
             void evaluateParam(unsigned int index, MultiType& param) const {}
 
Index: /code/branches/consolecommands3/src/libraries/core/Shell.cc
===================================================================
--- /code/branches/consolecommands3/src/libraries/core/Shell.cc	(revision 7188)
+++ /code/branches/consolecommands3/src/libraries/core/Shell.cc	(revision 7189)
@@ -308,8 +308,15 @@
         this->updateListeners<&ShellListener::executed>();
 
-        if (!CommandExecutor::execute(this->inputBuffer_->get()))
+        bool success;
+        const std::string& result = CommandExecutor::query(this->inputBuffer_->get(), &success);
+        if (!success)
         {
             this->outputBuffer_ << "Error: Can't execute \"" << this->inputBuffer_->get() << "\"." << std::endl;
             this->outputChanged(Error);
+        }
+        else if (result != "")
+        {
+            this->outputBuffer_ << result << std::endl;
+            this->outputChanged(Command);
         }
 
Index: /code/branches/consolecommands3/src/libraries/core/TclBind.cc
===================================================================
--- /code/branches/consolecommands3/src/libraries/core/TclBind.cc	(revision 7188)
+++ /code/branches/consolecommands3/src/libraries/core/TclBind.cc	(revision 7189)
@@ -134,13 +134,12 @@
         const std::string& command = stripEnclosingBraces(args.get());
 
-        if (!CommandExecutor::execute(command, false))
+        bool success;
+        const std::string& result = CommandExecutor::query(command, &success, false);
+        if (!success)
         {
             COUT(1) << "Error: Can't execute command \"" << command << "\"!" << std::endl;
         }
 
-        if (CommandExecutor::getLastEvaluation().hasReturnvalue())
-            return CommandExecutor::getLastEvaluation().getReturnvalue().getString();
-
-        return "";
+        return result;
     }
 
@@ -181,15 +180,19 @@
     }
 
-    bool TclBind::eval(const std::string& tclcode)
+    std::string TclBind::eval(const std::string& tclcode, bool* success)
     {
+        if (success)
+            *success = true;
+
         try
         {
-            TclBind::getInstance().interpreter_->eval(tclcode);
-            return true;
+            return TclBind::getInstance().interpreter_->eval(tclcode);
         }
         catch (Tcl::tcl_error const &e)
         {   COUT(1) << "Tcl error: " << e.what() << std::endl;   }
 
-        return false;
+        if (success)
+            *success = false;
+        return "";
     }
 }
Index: /code/branches/consolecommands3/src/libraries/core/TclBind.h
===================================================================
--- /code/branches/consolecommands3/src/libraries/core/TclBind.h	(revision 7188)
+++ /code/branches/consolecommands3/src/libraries/core/TclBind.h	(revision 7189)
@@ -59,5 +59,5 @@
             static void tcl_execute(Tcl::object const &args);
 
-            static bool eval(const std::string& tclcode);
+            static std::string eval(const std::string& tclcode, bool* success = 0);
 
         private:
Index: /code/branches/consolecommands3/src/libraries/core/TclThreadManager.cc
===================================================================
--- /code/branches/consolecommands3/src/libraries/core/TclThreadManager.cc	(revision 7188)
+++ /code/branches/consolecommands3/src/libraries/core/TclThreadManager.cc	(revision 7189)
@@ -439,9 +439,8 @@
                         // It's a query to the CommandExecutor
                         TclThreadManager::debug("TclThread_query -> CE: " + command);
-                        if (!CommandExecutor::execute(command, false))
+                        bool success;
+                        output = CommandExecutor::query(command, &success, false);
+                        if (!success)
                             TclThreadManager::error("Error: Can't execute command \"" + command + "\"!");
-
-                        if (CommandExecutor::getLastEvaluation().hasReturnvalue())
-                            output = CommandExecutor::getLastEvaluation().getReturnvalue().getString();
                     }
                     else
Index: /code/branches/consolecommands3/src/libraries/core/XMLPort.h
===================================================================
--- /code/branches/consolecommands3/src/libraries/core/XMLPort.h	(revision 7188)
+++ /code/branches/consolecommands3/src/libraries/core/XMLPort.h	(revision 7189)
@@ -398,5 +398,7 @@
                         {
                             COUT(5) << this->owner_->getLoaderIndentation() << "Loading parameter " << this->paramname_ << " in " << this->identifier_->getName() << " (objectname " << this->owner_->getName() << ")." << std::endl << this->owner_->getLoaderIndentation();
-                            if (this->loadexecutor_->parse(object, attributeValue, ",") || (mode  == XMLPort::ExpandObject))
+                            bool success;
+                            this->loadexecutor_->parse(object, attributeValue, &success, ",");
+                            if (success || (mode  == XMLPort::ExpandObject))
                                 this->parseResult_ = PR_finished;
                             else
Index: /code/branches/consolecommands3/src/libraries/util/MultiType.h
===================================================================
--- /code/branches/consolecommands3/src/libraries/util/MultiType.h	(revision 7188)
+++ /code/branches/consolecommands3/src/libraries/util/MultiType.h	(revision 7189)
@@ -78,4 +78,5 @@
 
 #include "TypeTraits.h"
+#include "mbool.h"
 
 namespace orxonox
@@ -266,4 +267,5 @@
             inline MultiType(const orxonox::Radian& value)      : value_(0) { this->assignValue(value); }           /** @brief Constructor: Assigns the given value and sets the type. */
             inline MultiType(const orxonox::Degree& value)      : value_(0) { this->assignValue(value); }           /** @brief Constructor: Assigns the given value and sets the type. */
+            inline MultiType(const orxonox::mbool& value)       : value_(0) { this->assignValue((bool)value); }     /** @brief Constructor: Assigns the given mbool and converts it to bool. */
             inline MultiType(const char* value)                 : value_(0) { this->setValue(std::string(value)); } /** @brief Constructor: Converts the char array to a std::string, assigns the value and sets the type. */
             inline MultiType(const MultiType& other)            : value_(0) { this->setValue(other); }              /** @brief Copyconstructor: Assigns value and type of the other MultiType. */
