Changeset 8289 in orxonox.OLD for branches/script_engine/src/lib
- Timestamp:
- Jun 8, 2006, 7:43:10 PM (18 years ago)
- Location:
- branches/script_engine/src/lib/script_engine
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/script_engine/src/lib/script_engine/script.cc
r8271 r8289 23 23 luaopen_math(luaState); 24 24 luaopen_debug(luaState); 25 26 25 if (root != NULL) 27 26 this->loadParams(root); … … 77 76 else 78 77 { 79 reportError(error); 80 } 81 82 } 83 else 84 { 78 printf("ERROR while loading file %s: ",filename.c_str()); 79 reportError(error); 80 } 81 82 } 83 else 84 { 85 printf("ERROR while loading file %s: ",filename.c_str()); 85 86 reportError(error); 86 87 } … … 92 93 void Script::addObject(const std::string& className, const std::string& objectName) 93 94 { 95 printf("Script: I am about to add %s of class %s\n",objectName.c_str(),className.c_str()); 96 94 97 BaseObject* scriptClass = ClassList::getObject(className, CL_SCRIPT_CLASS); 95 98 WorldObject tmpObj; … … 162 165 if(error != 0) 163 166 { 167 printf("ERROR while executing function %s: \n",currentFunction.c_str()); 164 168 reportError(error); 169 //clean up 170 currentFunction.assign(""); 171 argumentCount = returnCount = 0; 165 172 return false; 166 173 } … … 174 181 else 175 182 printf("Error: no function selected.\n"); 183 184 return false; 176 185 } 177 186 … … 296 305 fprintf(stderr, "ERROR: %s\n", msg); 297 306 lua_pop(luaState, 1); 307 } 298 308 return error; 299 309 } 300 }301 310 302 311 -
branches/script_engine/src/lib/script_engine/script_class.h
r8271 r8289 61 61 virtual int insertObject(Script* L, BaseObject* obj, bool gc=false) 62 62 { 63 Lunar<T>::insertObject(L, dynamic_cast<T*>(obj), obj->getName(), gc);63 return Lunar<T>::insertObject(L, dynamic_cast<T*>(obj), obj->getName(), gc); 64 64 } 65 65 -
branches/script_engine/src/lib/script_engine/script_manager.cc
r8285 r8289 1 1 #include <string> 2 2 #include <list> 3 4 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD 3 5 4 6 … … 19 21 { 20 22 this->setName("ScriptManager"); 21 printf("ScriptManager created\n");22 23 this->scripts = NULL; 23 24 this->triggers = NULL; … … 74 75 LOAD_PARAM_START_CYCLE(triggers, object); 75 76 { 76 new ScriptTrigger(object); PRINTF(0)("test output from createtriggers\n");77 new ScriptTrigger(object); 77 78 } 78 79 LOAD_PARAM_END_CYCLE(object);
Note: See TracChangeset
for help on using the changeset viewer.