Index: /code/branches/console/src/core/CommandExecutor.cc
===================================================================
--- /code/branches/console/src/core/CommandExecutor.cc	(revision 1187)
+++ /code/branches/console/src/core/CommandExecutor.cc	(revision 1188)
@@ -236,8 +236,19 @@
             if (this->shortcut_)
             {
-                if (this->shortcut_->evaluate(this->processedCommand_ + this->getAdditionalParameter(), this->param_, " "))
-                {
-                    this->bEvaluatedParams_ = true;
-                    this->evaluatedExecutor_ = this->shortcut_;
+                if (this->tokens_.size() <= 1)
+                {
+                    if (this->shortcut_->evaluate(this->getAdditionalParameter(), this->param_, " "))
+                    {
+                        this->bEvaluatedParams_ = true;
+                        this->evaluatedExecutor_ = this->shortcut_;
+                    }
+                }
+                else if (this->tokens_.size() > 1)
+                {
+                    if (this->shortcut_->evaluate(this->tokens_.subSet(1).join() + this->getAdditionalParameter(), this->param_, " "))
+                    {
+                        this->bEvaluatedParams_ = true;
+                        this->evaluatedExecutor_ = this->shortcut_;
+                    }
                 }
             }
@@ -247,8 +258,19 @@
             if (this->function_)
             {
-                if (this->function_->evaluate(this->processedCommand_ + this->getAdditionalParameter(), this->param_, " "))
-                {
-                    this->bEvaluatedParams_ = true;
-                    this->evaluatedExecutor_ = this->function_;
+                if (this->tokens_.size() <= 2)
+                {
+                    if (this->function_->evaluate(this->getAdditionalParameter(), this->param_, " "))
+                    {
+                        this->bEvaluatedParams_ = true;
+                        this->evaluatedExecutor_ = this->function_;
+                    }
+                }
+                else if (this->tokens_.size() > 2)
+                {
+                    if (this->function_->evaluate(this->tokens_.subSet(2).join() + this->getAdditionalParameter(), this->param_, " "))
+                    {
+                        this->bEvaluatedParams_ = true;
+                        this->evaluatedExecutor_ = this->function_;
+                    }
                 }
             }
@@ -354,6 +376,8 @@
     bool CommandExecutor::execute(const std::string& command)
     {
+std::cout << "CE_execute: " << command << "\n";
         if ((CommandExecutor::getEvaluation().processedCommand_ != command) || (CommandExecutor::getEvaluation().state_ == CS_Uninitialized))
-            CommandExecutor::parse(command);
+{std::cout << "CE_execute->parse\n";
+            CommandExecutor::parse(command);}
 
         return CommandExecutor::execute(CommandExecutor::getEvaluation());
@@ -368,4 +392,5 @@
         {
             (*evaluation.evaluatedExecutor_)(evaluation.param_[0], evaluation.param_[1], evaluation.param_[2], evaluation.param_[3], evaluation.param_[4]);
+            return true;
         }
 
@@ -612,4 +637,14 @@
     {
         CommandExecutor::parse(command, true);
+std::cout << "1_1: " << command << std::endl;
+        if (CommandExecutor::getEvaluation().tokens_.size() > 0)
+        {
+            std::string lastToken;
+            lastToken = CommandExecutor::getEvaluation().tokens_[CommandExecutor::getEvaluation().tokens_.size() - 1];
+            lastToken = lastToken.substr(0, lastToken.size() - 1);
+            CommandExecutor::getEvaluation().tokens_.pop_back();
+            CommandExecutor::getEvaluation().tokens_.append(SubString(lastToken, " "));
+        }
+std::cout << "1_2: " << CommandExecutor::getEvaluation().tokens_[CommandExecutor::getEvaluation().tokens_.size() - 1] << std::endl;
         CommandExecutor::getEvaluation().evaluateParams();
         return CommandExecutor::getEvaluation();
@@ -1049,4 +1084,7 @@
         CommandExecutor::getEvaluation().additionalParameter_ = "";
 
+        CommandExecutor::getEvaluation().bEvaluatedParams_ = false;
+        CommandExecutor::getEvaluation().evaluatedExecutor_ = 0;
+
         CommandExecutor::getEvaluation().listOfPossibleFunctionClasses_.clear();
         CommandExecutor::getEvaluation().listOfPossibleShortcuts_.clear();
Index: /code/branches/console/src/core/Functor.h
===================================================================
--- /code/branches/console/src/core/Functor.h	(revision 1187)
+++ /code/branches/console/src/core/Functor.h	(revision 1188)
@@ -284,23 +284,23 @@
 #define FUNCTOR_EVALUATE_PARAM0
 #define FUNCTOR_EVALUATE_PARAM1 \
-    if (index == 0) param = (P1)param
+    if (index == 0) { P1 temp = param; param = temp; }
 #define FUNCTOR_EVALUATE_PARAM2 \
-    if (index == 0) param = (P1)param; \
-    else if (index == 1) param = (P2)param
+    if (index == 0) { P1 temp = param; param = temp; } \
+    else if (index == 1) { P2 temp = param; param = temp; }
 #define FUNCTOR_EVALUATE_PARAM3 \
-    if (index == 0) param = (P1)param; \
-    else if (index == 1) param = (P2)param; \
-    else if (index == 2) param = (P3)param
+    if (index == 0) { P1 temp = param; param = temp; } \
+    else if (index == 1) { P2 temp = param; param = temp; } \
+    else if (index == 2) { P3 temp = param; param = temp; }
 #define FUNCTOR_EVALUATE_PARAM4 \
-    if (index == 0) param = (P1)param; \
-    else if (index == 1) param = (P2)param; \
-    else if (index == 2) param = (P3)param; \
-    else if (index == 3) param = (P4)param
+    if (index == 0) { P1 temp = param; param = temp; } \
+    else if (index == 1) { P2 temp = param; param = temp; } \
+    else if (index == 2) { P3 temp = param; param = temp; } \
+    else if (index == 3) { P4 temp = param; param = temp; }
 #define FUNCTOR_EVALUATE_PARAM5 \
-    if (index == 0) param = (P1)param; \
-    else if (index == 1) param = (P2)param; \
-    else if (index == 2) param = (P3)param; \
-    else if (index == 3) param = (P4)param; \
-    else if (index == 4) param = (P5)param
+    if (index == 0) { P1 temp = param; param = temp; } \
+    else if (index == 1) { P2 temp = param; param = temp; } \
+    else if (index == 2) { P3 temp = param; param = temp; } \
+    else if (index == 3) { P4 temp = param; param = temp; } \
+    else if (index == 4) { P5 temp = param; param = temp; }
 
 
Index: /code/branches/console/src/core/TclBind.cc
===================================================================
--- /code/branches/console/src/core/TclBind.cc	(revision 1187)
+++ /code/branches/console/src/core/TclBind.cc	(revision 1188)
@@ -1,2 +1,30 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
 #include <iostream>
 #include <string>
@@ -16,11 +44,15 @@
     }
 
-    std::string Tcl_unknown(Tcl::object const &a)
+    std::string Tcl_execute(Tcl::object const &args)
     {
 std::cout << "1\n";
-std::cout << a.get() << std::endl;
-        CommandEvaluation evaluation = CommandExecutor::evaluate(std::string(a.get()));
+std::cout << "args: " << args.get() << std::endl;
+        std::string command = args.get();
+        if (command.size() >= 2 && command[0] == '{' && command[command.size() - 1] == '}')
+            command = command.substr(1, command.size() - 2);
+        CommandEvaluation evaluation = CommandExecutor::evaluate(command);
 std::cout << "2\n";
-        CommandExecutor::execute(evaluation);
+        if (!CommandExecutor::execute(evaluation))
+            COUT(1) << "Error: Can't execute command \"" << command << "\"!" << std::endl;
 std::cout << "3\n";
         if (evaluation.hasReturnvalue())
@@ -39,12 +71,14 @@
             static Tcl::interpreter i;
             i.def("puts", Tcl_puts, Tcl::variadic());
-            i.def("blub", Tcl_unknown, Tcl::variadic());
+            i.def("execute", Tcl_execute, Tcl::variadic());
+            i.eval("proc unknown {args} { return [execute $args] }");
             std::string output = i.eval(tclcode);
-            COUT(0) << "tcl> " << output << std::endl;
+            if (output != "")
+                COUT(0) << "tcl> " << output << std::endl;
             return output;
         }
         catch (Tcl::tcl_error const &e)
         {
-            COUT(1) << "Error: Tcl: " << e.what() << std::endl;
+            COUT(1) << "tcl> Error: " << e.what() << std::endl;
         }
         catch (std::exception const &e)
Index: /code/branches/console/src/core/TclBind.h
===================================================================
--- /code/branches/console/src/core/TclBind.h	(revision 1187)
+++ /code/branches/console/src/core/TclBind.h	(revision 1188)
@@ -1,2 +1,30 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
 #ifndef _TclBind_H__
 #define _TclBind_H__
@@ -7,6 +35,6 @@
 {
     Tcl::interpreter* createNewInterpreter();
-    void Tcl_puts(Tcl::object const &c);
-    std::string Tcl_unknown(Tcl::object const &c);
+    void Tcl_puts(Tcl::object const &args);
+    std::string Tcl_execute(Tcl::object const &args);
     std::string tcl(const std::string& tclcode);
 }
Index: /code/branches/console/src/orxonox/Orxonox.cc
===================================================================
--- /code/branches/console/src/orxonox/Orxonox.cc	(revision 1187)
+++ /code/branches/console/src/orxonox/Orxonox.cc	(revision 1188)
@@ -129,5 +129,5 @@
   {
   public:
-    static void calculate(const std::string& calculation)
+    static float calculate(const std::string& calculation)
     {
       ExprParser expr(calculation);
@@ -141,7 +141,11 @@
           std::cout << "Warning: Expression could not be parsed to the end! Remains: '"
               << expr.getRemains() << "'" << std::endl;
+        return expr.getResult();
       }
       else
+      {
         std::cout << "Cannot calculate expression: Parse error" << std::endl;
+        return 0;
+      }
     }
   };
Index: /code/branches/console/src/orxonox/objects/Ambient.h
===================================================================
--- /code/branches/console/src/orxonox/objects/Ambient.h	(revision 1187)
+++ /code/branches/console/src/orxonox/objects/Ambient.h	(revision 1188)
@@ -48,5 +48,5 @@
 
             static void setAmbientLightTest(const ColourValue& colour)
-                { Ambient::instance_s->setAmbientLight(colour); }
+                { std::cout << "setambientlight: " << colour << std::endl; Ambient::instance_s->setAmbientLight(colour); }
 
         private:
