Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9242 in orxonox.OLD for branches


Ignore:
Timestamp:
Jul 6, 2006, 2:00:32 PM (18 years ago)
Author:
snellen
Message:

debug output von script, scriptmanager, scripttrigger an framework angepasst

Location:
branches/scripting/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/scripting/src/lib/script_engine/script.cc

    r9241 r9242  
    8787   if(currentFile.length() != 0)
    8888   {
    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());
    9090     return false;
    9191    }
     
    104104     else
    105105     {
    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());
    107107       reportError(error);
    108108     }
     
    111111   else
    112112   {
    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());
    114114     reportError(error);
    115115   }
     
    150150 bool Script::executeFile()
    151151 {
    152    PRINT(2)("WARNING: script.executeFile is not implemented yet");
     152   PRINT(2)("WARNING: script.executeFile is not implemented yet\n");
    153153   /*if(currentFile.length() != 0)
    154154   {
     
    183183   }
    184184   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());
    186186   return false;
    187187 }
     
    195195    if(error != 0)
    196196    {
    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());
    198198     reportError(error);
    199199     //clean up
     
    210210   }
    211211   else
    212      PRINT(1)("Error: no function selected.\n");
     212     PRINT(1)("SCRIPT %s : ERROR: no function selected.\n",currentFile.c_str());
    213213
    214214   return false;
     
    227227   else
    228228   {
    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());
    230230    return false;
    231231   }
     
    244244   else
    245245   {
    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());
    247247     return false;
    248248   }
     
    260260   else
    261261   {
    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());
    263263     return false;
    264264   }
     
    295295     }
    296296     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());
    298298   }
    299299   return returnValue;
     
    346346 {
    347347  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);
    350350  lua_pop(luaState, 1);
    351351 }
  • branches/scripting/src/world_entities/script_trigger.cc

    r9241 r9242  
    4848 */
    4949ScriptTrigger::ScriptTrigger(const TiXmlElement* root)
    50 {
     50{ PRINT(1)("testerror\n");
    5151  this->setClassID(CL_SCRIPT_TRIGGER, "ScriptTrigger");
    5252  this->toList(OM_COMMON);
Note: See TracChangeset for help on using the changeset viewer.