Index: /branches/scripting/src/lib/script_engine/script.cc
===================================================================
--- /branches/scripting/src/lib/script_engine/script.cc	(revision 9240)
+++ /branches/scripting/src/lib/script_engine/script.cc	(revision 9241)
@@ -17,5 +17,5 @@
 #include "script_class.h"
 #include "luaincl.h"
-
+#include "debug.h"
 #include "util/loading/resource_manager.h"
 
@@ -87,5 +87,5 @@
    if(currentFile.length() != 0)
    {
-     printf("Could not load %s because an other file is already loaded: %s\n",filename.c_str(), currentFile.c_str());
+     PRINT(1)("Could not load %s because an other file is already loaded: %s\n",filename.c_str(), currentFile.c_str());
      return false;
     }
@@ -104,5 +104,5 @@
      else
      {
-       printf("ERROR while loading file %s: \n",filename.c_str());
+       PRINT(1)("ERROR while loading file %s: \n",filename.c_str());
        reportError(error);
      }
@@ -111,5 +111,5 @@
    else
    {
-     printf("ERROR while loading file %s: \n",filename.c_str());
+     PRINT(1)("ERROR while loading file %s: \n",filename.c_str());
      reportError(error);
    }
@@ -150,5 +150,5 @@
  bool Script::executeFile()
  {
-   printf("WARNING: script.executeFile is not implemented yet");
+   PRINT(2)("WARNING: script.executeFile is not implemented yet");
    /*if(currentFile.length() != 0)
    {
@@ -183,5 +183,5 @@
    }
    else
-     printf("There is an other function active ( %s ) or there are unremoved return values on the stack. Please remove them first.\n",currentFunction.c_str());
+     PRINT(1)("There is an other function active ( %s ) or there are unremoved return values on the stack. Please remove them first.\n",currentFunction.c_str());
    return false;
  }
@@ -195,5 +195,5 @@
     if(error != 0)
     {
-     printf("ERROR while executing function %s: \n",currentFunction.c_str());
+      PRINT(1)("ERROR while executing function %s: \n",currentFunction.c_str());
      reportError(error);
      //clean up
@@ -210,5 +210,5 @@
    }
    else
-     printf("Error: no function selected.\n");
+     PRINT(1)("Error: no function selected.\n");
 
    return false;
@@ -227,5 +227,5 @@
    else
    {
-    printf("Couldn't add parameter because the wrong function is selected: %s instead of %s\n", currentFunction.c_str(), toFunction.c_str());
+     PRINT(1)("Couldn't add parameter because the wrong function is selected: %s instead of %s\n", currentFunction.c_str(), toFunction.c_str());
     return false;
    }
@@ -244,5 +244,5 @@
    else
    {
-     printf("Couldn't add parameter because the wrong function is selected: %s instead of %s\n", currentFunction.c_str(), toFunction.c_str());
+     PRINT(1)("Couldn't add parameter because the wrong function is selected: %s instead of %s\n", currentFunction.c_str(), toFunction.c_str());
      return false;
    }
@@ -260,5 +260,5 @@
    else
    {
-     printf("Couldn't add parameter because the wrong function is selected: %s instead of %s\n", currentFunction.c_str(), toFunction.c_str());
+     PRINT(1)("Couldn't add parameter because the wrong function is selected: %s instead of %s\n", currentFunction.c_str(), toFunction.c_str());
      return false;
    }
@@ -295,5 +295,5 @@
      }
      else
-       printf("ERROR: Form %s : trying to retreive non bolean value",this->currentFile.c_str());
+       PRINT(1)("ERROR: Form %s : trying to retreive non bolean value",this->currentFile.c_str());
    }
    return returnValue;
Index: /branches/scripting/src/world_entities/npcs/gate.cc
===================================================================
--- /branches/scripting/src/world_entities/npcs/gate.cc	(revision 9240)
+++ /branches/scripting/src/world_entities/npcs/gate.cc	(revision 9241)
@@ -41,5 +41,5 @@
                             addMethod("hide", ExecutorLua0<WorldEntity>(&WorldEntity::hide))
                             ->addMethod("unhide", ExecutorLua0<WorldEntity>(&WorldEntity::unhide))
-                           // ->addMethod("destroy", ExecutorLua0<Gate>(&Gate::destroy()))    
+                            ->addMethod("destroy", ExecutorLua0<Gate>(&Gate::destroy))    
                             ->addMethod("setAbsCoor", ExecutorLua3<PNode,float,float,float>(&PNode::setAbsCoor))
                             ->addMethod("getAbsCoorX", ExecutorLua0ret<PNode, float>(&PNode::getAbsCoorX))
Index: /branches/scripting/src/world_entities/script_trigger.cc
===================================================================
--- /branches/scripting/src/world_entities/script_trigger.cc	(revision 9240)
+++ /branches/scripting/src/world_entities/script_trigger.cc	(revision 9241)
@@ -202,10 +202,10 @@
        //testScriptingFramework();
     if(!(script->selectFunction(this->functionName,returnCount)) )
-      printf("Error ScriptTrigger: Selection of %s in %s failed.\n",functionName.c_str(), script->getFileName().c_str());
+      PRINT(1)("Error ScriptTrigger: Selection of %s in %s failed.\n",functionName.c_str(), script->getFileName().c_str());
      
     script->pushParam( timestep, this->functionName);
      
     if( !(script->executeFunction()) )
-      printf("Error ScriptTrigger: Execution of %s in %s failed.\n",functionName.c_str(), script->getFileName().c_str());
+      PRINT(1)("Error ScriptTrigger: Execution of %s in %s failed.\n",functionName.c_str(), script->getFileName().c_str());
      
     scriptFinished = script->getReturnedBool();
