Index: /branches/script_engine/src/lib/gui/gl_gui/signal_connector.cc
===================================================================
--- /branches/script_engine/src/lib/gui/gl_gui/signal_connector.cc	(revision 8091)
+++ /branches/script_engine/src/lib/gui/gl_gui/signal_connector.cc	(revision 8092)
@@ -92,5 +92,8 @@
   {
     if (this->isValid())
-      (*this->exec)(this->object, 0, NULL);
+    {
+      static int count = 0;
+      (*this->exec)(this->object, count, NULL);
+    }
   }
 
@@ -102,5 +105,8 @@
   {
     if (exec != NULL && object != NULL)
-      (*this->exec)(this->object, 1, (void*)&value0);
+    {
+      static int count = 1;
+      (*this->exec)(this->object, count, (void*)&value0);
+    }
   }
 
@@ -114,6 +120,7 @@
     if (exec != NULL && object != NULL)
     {
+      static int count = 2;
       MultiType mt[] = { value0, value1 };
-      (*this->exec)(this->object, 2, mt);
+      (*this->exec)(this->object, count, mt);
     }
   }
@@ -129,6 +136,7 @@
     if (exec != NULL && object != NULL)
     {
+      static int count = 3;
       MultiType mt[] = { value0, value1, value2 };
-      (*this->exec)(this->object, 3, mt);
+      (*this->exec)(this->object, count, mt);
     }
   }
@@ -145,6 +153,7 @@
     if (exec != NULL && object != NULL)
     {
+      static int count = 4;
       MultiType mt[] = { value0, value1, value2, value3 };
-      (*this->exec)(this->object, 4, mt);
+      (*this->exec)(this->object, count, mt);
     }
   }
@@ -162,6 +171,7 @@
     if (exec != NULL && object != NULL)
     {
+      static int count = 5;
       MultiType mt[] = { value0, value1, value2, value3, value4 };
-      (*this->exec)(this->object, 5, mt);
+      (*this->exec)(this->object, count, mt);
     }
   }
Index: /branches/script_engine/src/lib/script_engine/lunar.h
===================================================================
--- /branches/script_engine/src/lib/script_engine/lunar.h	(revision 8091)
+++ /branches/script_engine/src/lib/script_engine/lunar.h	(revision 8092)
@@ -6,4 +6,5 @@
 
 #include "luaincl.h"
+#include "executor/executor_lua.h"
 
 
Index: /branches/script_engine/src/lib/util/executor/executor.h
===================================================================
--- /branches/script_engine/src/lib/util/executor/executor.h	(revision 8091)
+++ /branches/script_engine/src/lib/util/executor/executor.h	(revision 8092)
@@ -53,5 +53,5 @@
     // EXECUTE
     /** executes a Command. @param objec the Object, @param count how many values, @param values the Values */
-    virtual void operator()(BaseObject* object, unsigned int count, void* values) const = 0;
+    virtual void operator()(BaseObject* object, int& count, void* values) const = 0;
     /** executes a Command @param object the object to apply this to @param parameters the parameters the command takes */
     virtual void operator()(BaseObject* object, const SubString& sub = SubString()) const = 0;
Index: /branches/script_engine/src/lib/util/executor/executor_functional.h
===================================================================
--- /branches/script_engine/src/lib/util/executor/executor_functional.h	(revision 8091)
+++ /branches/script_engine/src/lib/util/executor/executor_functional.h	(revision 8092)
@@ -123,5 +123,5 @@
 
   /** executes a Command. @param objec the Object, @param count how many values, @param values the Values */
-  virtual void operator()(BaseObject* object, unsigned int count, void* values) const
+  virtual void operator()(BaseObject* object, int& count, void* values) const
   {
     (__EXECUTOR_FUNCTIONAL_FUNCTION_EXEC)();
@@ -163,5 +163,5 @@
 
   /** executes a Command. @param objec the Object, @param count how many values, @param values the Values */
-  virtual void operator()(BaseObject* object, unsigned int count, void* values) const
+  virtual void operator()(BaseObject* object, int& count, void* values) const
   {
     const MultiType* mt = (const MultiType*)values;
@@ -227,5 +227,5 @@
 
   /** executes a Command. @param objec the Object, @param count how many values, @param values the Values */
-  virtual void operator()(BaseObject* object, unsigned int count, void* values) const
+  virtual void operator()(BaseObject* object, int& count, void* values) const
   {
     const MultiType* mt = (const MultiType*)values;
@@ -282,5 +282,5 @@
 
   /** executes a Command. @param objec the Object, @param count how many values, @param values the Values */
-  virtual void operator()(BaseObject* object, unsigned int count, void* values) const
+  virtual void operator()(BaseObject* object, int& count, void* values) const
   {
     const MultiType* mt = (const MultiType*)values;
@@ -340,5 +340,5 @@
 
   /** executes a Command. @param objec the Object, @param count how many values, @param values the Values */
-  virtual void operator()(BaseObject* object, unsigned int count, void* values) const
+  virtual void operator()(BaseObject* object, int& count, void* values) const
   {
     const MultiType* mt = (const MultiType*)values;
@@ -400,5 +400,5 @@
 
   /** executes a Command. @param objec the Object, @param count how many values, @param values the Values */
-  virtual void operator()(BaseObject* object, unsigned int count, void* values) const
+  virtual void operator()(BaseObject* object, int& count, void* values) const
   {
     const MultiType* mt = (const MultiType*)values;
Index: /branches/script_engine/src/lib/util/executor/executor_lua.cc
===================================================================
--- /branches/script_engine/src/lib/util/executor/executor_lua.cc	(revision 8091)
+++ /branches/script_engine/src/lib/util/executor/executor_lua.cc	(revision 8092)
@@ -18,17 +18,17 @@
 #include "executor_lua.h"
 
-template<> bool fromLua<bool>(lua_state* state, int index) { return lua_toboolean(state, index); };
-template<> int fromLua<int>(lua_state* state, int index) { return (int)lua_toumber(state, index); };
-template<> unsigned int fromLua<unsigned int>(lua_state* state, int index) { return (unsigned int)lua_tonumber(state, index); };
-template<> float fromLua<float>(lua_state* state, int index) { return (float)lua_tonumber(state, index); };
-template<> char fromLua<char>(lua_state* state, int index) { reutnr (char)lua_tonumber(state, index); };
-template<> const std::string& fromLua<const std::string&>(lua_state* state, int index) { return lua_tostring(state, index); };
+template<> bool fromLua<bool>(lua_State* state, int index) { return lua_toboolean(state, index); };
+template<> int fromLua<int>(lua_State* state, int index) { return (int)lua_toumber(state, index); };
+template<> unsigned int fromLua<unsigned int>(lua_State* state, int index) { return (unsigned int)lua_tonumber(state, index); };
+template<> float fromLua<float>(lua_State* state, int index) { return (float)lua_tonumber(state, index); };
+template<> char fromLua<char>(lua_State* state, int index) { reutnr (char)lua_tonumber(state, index); };
+template<> const std::string& fromLua<const std::string&>(lua_State* state, int index) { return lua_tostring(state, index); };
 
 
 
-template<> void toLua<bool>(lua_state* state, bool value) { lua_pushboolean(state, (int) value); };
-template<> void toLua<int>(lua_state* state, int value)  { lua_pushnumber(state, (lua_Number) value); };
-template<> void toLua<unsigned int>(lua_state* state, unsigned int value){ lua_pushnumber(state, (lua_Number) value); };
-template<> void toLua<float>(lua_state* state, float value) { lua_pushnumber(state, (lua_Number) value); };
-template<> void toLua<char>(lua_state* state, char value) { lua_pushnumber(state, (lua_Number) value); };
-template<> void toLua<const std::string&>(lua_state* state, const std::string& value) {lua_pushstring (state, value.c_str()); }
+template<> void toLua<bool>(lua_State* state, bool value) { lua_pushboolean(state, (int) value); };
+template<> void toLua<int>(lua_State* state, int value)  { lua_pushnumber(state, (lua_Number) value); };
+template<> void toLua<unsigned int>(lua_State* state, unsigned int value){ lua_pushnumber(state, (lua_Number) value); };
+template<> void toLua<float>(lua_State* state, float value) { lua_pushnumber(state, (lua_Number) value); };
+template<> void toLua<char>(lua_State* state, char value) { lua_pushnumber(state, (lua_Number) value); };
+template<> void toLua<const std::string&>(lua_State* state, const std::string& value) {lua_pushstring (state, value.c_str()); }
Index: /branches/script_engine/src/lib/util/executor/executor_lua.h
===================================================================
--- /branches/script_engine/src/lib/util/executor/executor_lua.h	(revision 8091)
+++ /branches/script_engine/src/lib/util/executor/executor_lua.h	(revision 8092)
@@ -9,25 +9,25 @@
 #include "executor.h"
 #include "compiler.h"
-
+#include "debug.h"
 #include "luaincl.h"
 
 
 
-template<typename type> type fromLua(lua_state* state, int index) { PRINTF(1)("NOT IMPLEMENTED\n"); };
-template<> bool fromLua<bool>(lua_state* state, int index);
-template<> int fromLua<int>(lua_state* state, int index);
-template<> unsigned int fromLua<unsigned int>(lua_state* state, int index);
-template<> float fromLua<float>(lua_state* state, int index);
-template<> char fromLua<char>(lua_state* state, int index);
-template<> const std::string& fromLua<const std::string&>(lua_state* state, int index);
-
-
-template<typename type> void toLua(lua_state* state, type value) { PRINTF(1)("NOT IMPLEMENTED\n"); };
-template<> void toLua<bool>(lua_state* state, bool value);
-template<> void toLua<int>(lua_state* state, int value);
-template<> void toLua<unsigned int>(lua_state* state, unsigned int value);
-template<> void toLua<float>(lua_state* state, float value);
-template<> void toLua<char>(lua_state* state, char value);
-template<> void toLua<const std::string&>(lua_state* state, const std::string& value);
+template<typename type> type fromLua(lua_State* state, int index) { PRINTF(1)("NOT IMPLEMENTED\n"); };
+template<> bool fromLua<bool>(lua_State* state, int index);
+template<> int fromLua<int>(lua_State* state, int index);
+template<> unsigned int fromLua<unsigned int>(lua_State* state, int index);
+template<> float fromLua<float>(lua_State* state, int index);
+template<> char fromLua<char>(lua_State* state, int index);
+template<> const std::string& fromLua<const std::string&>(lua_State* state, int index);
+
+
+template<typename type> void toLua(lua_State* state, type value) { PRINTF(1)("NOT IMPLEMENTED\n"); };
+template<> void toLua<bool>(lua_State* state, bool value);
+template<> void toLua<int>(lua_State* state, int value);
+template<> void toLua<unsigned int>(lua_State* state, unsigned int value);
+template<> void toLua<float>(lua_State* state, float value);
+template<> void toLua<char>(lua_State* state, char value);
+template<> void toLua<const std::string&>(lua_State* state, const std::string& value);
 
 // FORWARD DECLARATION
@@ -37,5 +37,5 @@
 //// 0 ////
 ///////////
-//! Executes a Function with a lua_state* parameter.
+//! Executes a Function with a lua_State* parameter.
 template<class T> class ExecutorLua0 : public Executor
 {
@@ -62,7 +62,8 @@
     }
 
-    virtual void operator()(BaseObject* object, unsigned int count, void* values) const
+    virtual void operator()(BaseObject* object, int& count, void* values) const
     {
       (dynamic_cast<T*>(object)->*(functionPointer))();
+      count = 0;
     }
 
@@ -72,5 +73,5 @@
     virtual Executor* clone () const
     {
-      return = new ExecutorLua0<T>(ExecutorLua0<T>(this->functionPointer));
+      return new ExecutorLua0<T>(ExecutorLua0<T>(this->functionPointer));
     }
 };
@@ -81,5 +82,5 @@
 //// 1 ////
 ///////////
-//! Executes a Function with a lua_state* parameter.
+//! Executes a Function with a lua_State* parameter.
 template<class T, typename type0> class ExecutorLua1 : public Executor
 {
@@ -89,5 +90,5 @@
      * @param function a Function to call
      */
-    ExecutorLua0(void(T::*function)(type0))
+    ExecutorLua1(void(T::*function)(type0))
         : Executor(ExecutorParamType<type0>())
     {
@@ -106,7 +107,8 @@
     }
 
-    virtual void operator()(BaseObject* object, unsigned int count, void* values) const
-    {
-      lua_state* state = (lua_state*)values;
+    virtual void operator()(BaseObject* object, int& count, void* values) const
+    {
+      lua_State* state = (lua_State*)values;
+      count = 0;
 
       (dynamic_cast<T*>(object)->*(functionPointer))(fromLua<type0>(state, 1));
@@ -118,5 +120,5 @@
     virtual Executor* clone () const
     {
-      return = new ExecutorLua0<T>(ExecutorLua0<T>(this->functionPointer));
+      return new ExecutorLua1<T, type0>((this->functionPointer));
     }
 };
@@ -127,13 +129,13 @@
 //// 2 ////
 ///////////
-//! Executes a Function with a lua_state* parameter.
-template<class T, typename type0, typename type1> class ExecutorLua1 : public Executor
-{
-  public:
-    /**
-     * @brief Constructor of a ExecutorXML
-     * @param function a Function to call
-     */
-    ExecutorLua0(void(T::*function)(type0, type1))
+//! Executes a Function with a lua_State* parameter.
+template<class T, typename type0, typename type1> class ExecutorLua2 : public Executor
+{
+  public:
+    /**
+     * @brief Constructor of a ExecutorXML
+     * @param function a Function to call
+     */
+    ExecutorLua2(void(T::*function)(type0, type1))
         : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>())
     {
@@ -152,7 +154,8 @@
     }
 
-    virtual void operator()(BaseObject* object, unsigned int count, void* values) const
-    {
-      lua_state* state = (lua_state*)values;
+    virtual void operator()(BaseObject* object, int& count, void* values) const
+    {
+      lua_State* state = (lua_State*)values;
+      count = 0;
 
       (dynamic_cast<T*>(object)->*(functionPointer))(
@@ -166,7 +169,68 @@
     virtual Executor* clone () const
     {
-      return = new ExecutorLua0<T>(ExecutorLua0<T>(this->functionPointer));
-    }
-};
+      return new ExecutorLua2<T, type0, type1>(this->functionPointer);
+    }
+};
+
+
+
+
+
+
+
+////////////////////
+///// WITH RET /////
+////////////////////
+
+///////////
+//// 2 ////
+///////////
+//! Executes a Function with a lua_State* parameter.
+template<class T, typename ret, typename type0, typename type1> class ExecutorLua2ret : public Executor
+{
+  public:
+    /**
+     * @brief Constructor of a ExecutorXML
+     * @param function a Function to call
+     */
+    ExecutorLua2ret(ret (T::*function)(type0, type1))
+        : Executor(ExecutorParamType<type0>(), ExecutorParamType<type1>())
+    {
+      this->functionPointer = function;
+      this->functorType = Executor_Objective | Executor_NoLoadString;
+    }
+
+    /**
+     * @brief executes the Command on BaseObject
+     * @param object the BaseObject to execute this Executor on
+     * @param loadString ignored in this case
+     */
+    virtual void operator()(BaseObject* object, const SubString& = SubString()) const
+    {
+      PRINTF(1)("no usefull executor\n");
+    }
+
+    virtual void operator()(BaseObject* object, int& count, void* values) const
+    {
+      lua_State* state = (lua_State*)values;
+      count = 1;
+
+      toLua<ret>(state, (dynamic_cast<T*>(object)->*(functionPointer))(
+        fromLua<type0>(state, 1),
+        fromLua<type1>(state, 2) ));
+    }
+
+    /**
+     * @returns a _new_ Copy of this Executor
+     */
+    virtual Executor* clone () const
+    {
+      return new ExecutorLua2ret<T, ret, type0, type1>(this->functionPointer);
+    }
+};
+
+
+
+
 
 
Index: /branches/script_engine/src/lib/util/executor/executor_xml.h
===================================================================
--- /branches/script_engine/src/lib/util/executor/executor_xml.h	(revision 8091)
+++ /branches/script_engine/src/lib/util/executor/executor_xml.h	(revision 8092)
@@ -65,5 +65,5 @@
     }
 
-    virtual void operator()(BaseObject* object, unsigned int count, void* values) const
+    virtual void operator()(BaseObject* object, int& count, void* values) const
     {
       PRINTF(1)("missuse of XML-operator, OR IMPLEMENT.\n");
