Changeset 9242 in orxonox.OLD for branches/scripting/src/lib/script_engine/script.cc
- Timestamp:
- Jul 6, 2006, 2:00:32 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/scripting/src/lib/script_engine/script.cc
r9241 r9242 87 87 if(currentFile.length() != 0) 88 88 { 89 PRINT(1)(" Could not load %s because an other file is already loaded: %s\n",filename.c_str(), currentFile.c_str());89 PRINT(1)("SCRIPT %s : ERROR: Could not load %s because an other file is already loaded: %s\n",currentFile.c_str(),filename.c_str(), currentFile.c_str()); 90 90 return false; 91 91 } … … 104 104 else 105 105 { 106 PRINT(1)(" ERROR while loading file %s: \n",filename.c_str());106 PRINT(1)("SCRIPT %s : ERROR: while loading file %s: \n",currentFile.c_str(),filename.c_str()); 107 107 reportError(error); 108 108 } … … 111 111 else 112 112 { 113 PRINT(1)(" ERROR while loading file %s: \n",filename.c_str());113 PRINT(1)("SCRIPT %s : ERROR: while loading file %s: \n",currentFile.c_str(),filename.c_str()); 114 114 reportError(error); 115 115 } … … 150 150 bool Script::executeFile() 151 151 { 152 PRINT(2)("WARNING: script.executeFile is not implemented yet ");152 PRINT(2)("WARNING: script.executeFile is not implemented yet\n"); 153 153 /*if(currentFile.length() != 0) 154 154 { … … 183 183 } 184 184 else 185 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());185 PRINT(1)("SCRIPT %s : ERROR: There is an other function active ( %s ) or there are unremoved return values on the stack. Please remove them first.\n",currentFile.c_str(),currentFunction.c_str()); 186 186 return false; 187 187 } … … 195 195 if(error != 0) 196 196 { 197 PRINT(1)(" ERROR while executing function %s: \n",currentFunction.c_str());197 PRINT(1)("SCRIPT %s : ERROR: Failed to execute function %s: \n",currentFile.c_str(),currentFunction.c_str()); 198 198 reportError(error); 199 199 //clean up … … 210 210 } 211 211 else 212 PRINT(1)(" Error: no function selected.\n");212 PRINT(1)("SCRIPT %s : ERROR: no function selected.\n",currentFile.c_str()); 213 213 214 214 return false; … … 227 227 else 228 228 { 229 PRINT(1)(" Couldn't add parameter because the wrong function is selected: %s instead of %s\n", currentFunction.c_str(), toFunction.c_str());229 PRINT(1)("SCRIPT %s : ERROR: Couldn't add parameter because the wrong function is selected: %s instead of %s\n",currentFile.c_str(), currentFunction.c_str(), toFunction.c_str()); 230 230 return false; 231 231 } … … 244 244 else 245 245 { 246 PRINT(1)(" Couldn't add parameter because the wrong function is selected: %s instead of %s\n", currentFunction.c_str(), toFunction.c_str());246 PRINT(1)("SCRIPT %s : ERROR: Couldn't add parameter because the wrong function is selected: %s instead of %s\n",currentFile.c_str(), currentFunction.c_str(), toFunction.c_str()); 247 247 return false; 248 248 } … … 260 260 else 261 261 { 262 PRINT(1)(" Couldn't add parameter because the wrong function is selected: %s instead of %s\n", currentFunction.c_str(), toFunction.c_str());262 PRINT(1)("SCRIPT %s : ERROR: Couldn't add parameter because the wrong function is selected: %s instead of %s\n",currentFile.c_str(), currentFunction.c_str(), toFunction.c_str()); 263 263 return false; 264 264 } … … 295 295 } 296 296 else 297 PRINT(1)(" ERROR: Form %s : trying to retreive non bolean value",this->currentFile.c_str());297 PRINT(1)("SCRIPT %s : ERROR: Trying to retreive non bolean value\n",this->currentFile.c_str()); 298 298 } 299 299 return returnValue; … … 346 346 { 347 347 const char *msg = lua_tostring(luaState, -1); 348 if (msg == NULL) msg = "(error with no message) ";349 fprintf(stderr,"ERROR: %s\n", msg);348 if (msg == NULL) msg = "(error with no message)\n"; 349 PRINT(1)("ERROR: %s\n", msg); 350 350 lua_pop(luaState, 1); 351 351 }
Note: See TracChangeset
for help on using the changeset viewer.