Index: trunk/src/lib/script_engine/Makefile.am
===================================================================
--- trunk/src/lib/script_engine/Makefile.am	(revision 8413)
+++ trunk/src/lib/script_engine/Makefile.am	(revision 8711)
@@ -16,10 +16,6 @@
                 script_manager.cc \
 		script_class.cc \
-		script_method.cc \
-		\
-		account.cc \
-		object.cc
-
-
+		script_method.cc
+		
 AM_CPPFLAGS= @LUA_INCLUDES@
 
Index: trunk/src/lib/script_engine/lunartest.lua
===================================================================
--- trunk/src/lib/script_engine/lunartest.lua	(revision 8413)
+++ 	(revision )
@@ -1,35 +1,0 @@
- function printf(...) io.write(string.format(unpack(arg))) end
-
-function Account:show()
-  printf("Account balance = $%0.02f\n", self:balance())
-end
-
-
-o = Object()
-o:printName()
-
-Obj:printName() --external added object
-
-a = Account(100)
-b = Account:new(30)
-
-print('a =', a)
-print('b =', b)
-print('metatable =', getmetatable(a))
-print('Account =', Account)
-table.foreach(Account, print)
-
-a:show() a:deposit(50.30) a:show() a:withdraw(25.10) a:show()
-
-
-
-parent = {}
- function parent:rob(amount)
-  amount = amount or self:balance()
-  self:withdraw(amount)
-  return amount
-end
-
-getmetatable(Account).__index = parent
-
---debug.debug()
Index: trunk/src/lib/script_engine/lunartest2.lua
===================================================================
--- trunk/src/lib/script_engine/lunartest2.lua	(revision 8413)
+++ trunk/src/lib/script_engine/lunartest2.lua	(revision 8711)
@@ -22,17 +22,16 @@
 
 function main(arg)
-  io.write("hello i am main!")
+  io.write("hello i am main!\n")
   -- use parameter
   io.write("main received ", arg)
   io.write(" as parameter\n")
 
- o = Object()
-  o:printName()
+ 
   --call member of an inserted object
   Obj:printName()
 
   --create object of a registered type
-  --o = Object()
-  --o:printName()
+  o = Object()
+  o:printName()
 
   --take returnvalue from c
Index: trunk/src/lib/script_engine/script.cc
===================================================================
--- trunk/src/lib/script_engine/script.cc	(revision 8413)
+++ trunk/src/lib/script_engine/script.cc	(revision 8711)
@@ -1,6 +1,22 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   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, or (at your option)
+   any later version.
+
+### File Specific:
+   main-programmer: Silvan Nellen
+   co-programmer: Benjamin Grauer
+*/
+
 #include "script.h"
 #include "script_class.h"
 #include "luaincl.h"
 
+#include "util/loading/resource_manager.h"
 
 #include "loading/load_param.h"
@@ -58,4 +74,7 @@
  {
 
+   std::string filedest(ResourceManager::getInstance()->getDataDir());
+   filedest += "scripts/" + filename;
+   
    if(currentFile.length() != 0)
    {
@@ -64,8 +83,9 @@
     }
 
-   int error = luaL_loadfile (luaState, filename.c_str());
+   int error = luaL_loadfile (luaState, filedest.c_str());
 
    if(error == 0)
    {
+     
      error = lua_pcall(luaState, 0, 0, 0);
 
@@ -192,9 +212,9 @@
  bool Script::pushParam(int param, std::string& toFunction)
  {
-   if(currentFunction.compare(toFunction) == 0)
+   if(currentFunction == toFunction)
    {
      lua_pushnumber(luaState, (lua_Number) param);
      argumentCount++;
-    return true;
+     return true;
    }
    else
@@ -267,4 +287,6 @@
        returnCount--;
      }
+     else
+       printf("ERROR: Form %s : trying to retreive non bolean value",this->currentFile.c_str());
    }
    return returnValue;
@@ -313,4 +335,33 @@
  }
 
+ bool Script::registerStandartClasses()
+ {
+   bool success = false;
+   
+   //success = this->registerClass(std::string("Vector"));
+   
+   return success;
+ }
+ 
+ 
+ bool Script::registerClass( const std::string& className)
+ {
+   BaseObject* scriptClass = ClassList::getObject(className, CL_SCRIPT_CLASS);
+   //printf("The script class for %s is at %p \n",className.c_str(),scriptClass);
+   WorldObject tmpObj;
+   if (scriptClass != NULL)
+   {
+     tmpObj.type = className;
+     if( !classIsRegistered(className) )
+     {
+       static_cast<ScriptClass*>(scriptClass)->registerClass(this);
+       tmpObj.name = "";
+       registeredObjects.push_back(tmpObj);
+       return true;
+     }
+   }
+   return false;
+ 
+ }
 
  bool Script::classIsRegistered(const std::string& type)
Index: trunk/src/lib/script_engine/script.h
===================================================================
--- trunk/src/lib/script_engine/script.h	(revision 8413)
+++ trunk/src/lib/script_engine/script.h	(revision 8711)
@@ -1,2 +1,7 @@
+/*!
+ * @file scrip.h
+ *  wrapper for a lua_State
+ */
+
 #ifndef _SCRIPT_H
 #define _SCRIPT_H
@@ -58,4 +63,6 @@
 
     int  reportError(int error);                      //!< Get errormessage from the lua stack and print it.
+    bool registerStandartClasses();                   //!< Register all the classes that the script might need
+    bool registerClass(const std::string& className); //!< Register a class but dont add any instances 
     bool classIsRegistered(const std::string& type);  //!< Checks wheter the class "type" has already been registered with the script
     bool objectIsAdded(const std::string& name);      //!< Checks wheter the object "name" has already been added to the script
Index: trunk/src/lib/script_engine/script_class.cc
===================================================================
--- trunk/src/lib/script_engine/script_class.cc	(revision 8413)
+++ trunk/src/lib/script_engine/script_class.cc	(revision 8711)
@@ -10,5 +10,5 @@
 
    ### File Specific:
-   main-programmer: ...
+   main-programmer: Benjamin Grauer
    co-programmer: ...
 */
Index: trunk/src/lib/script_engine/script_manager.cc
===================================================================
--- trunk/src/lib/script_engine/script_manager.cc	(revision 8413)
+++ trunk/src/lib/script_engine/script_manager.cc	(revision 8711)
@@ -1,2 +1,18 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   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, or (at your option)
+   any later version.
+
+### File Specific:
+   main-programmer: Silvan Nellen
+   co-programmer: Benjamin Grauer
+*/
+
+
 #include <string>
 #include <list>
Index: trunk/src/lib/script_engine/script_manager.h
===================================================================
--- trunk/src/lib/script_engine/script_manager.h	(revision 8413)
+++ trunk/src/lib/script_engine/script_manager.h	(revision 8711)
@@ -1,2 +1,7 @@
+/*!
+ * @file scrip_manager.h
+ *  manages the scripts
+ */
+
 #ifndef _SCRIPT_MANAGER_H
 #define _SCRIPT_MANAGER_H
Index: trunk/src/lib/script_engine/script_method.cc
===================================================================
--- trunk/src/lib/script_engine/script_method.cc	(revision 8413)
+++ trunk/src/lib/script_engine/script_method.cc	(revision 8711)
@@ -10,5 +10,5 @@
 
    ### File Specific:
-   main-programmer: ...
+   main-programmer: Benjamin Grauer
    co-programmer: ...
 */
Index: trunk/src/lib/script_engine/script_method.h
===================================================================
--- trunk/src/lib/script_engine/script_method.h	(revision 8413)
+++ trunk/src/lib/script_engine/script_method.h	(revision 8711)
@@ -1,4 +1,4 @@
 /*!
- * @file script_class.h
+ * @file script_method.h
  * @brief Definition of ...
 */
