Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9241 in orxonox.OLD for branches/scripting/src/lib


Ignore:
Timestamp:
Jul 6, 2006, 12:44:18 PM (18 years ago)
Author:
snellen
Message:

error messages von script, scrripttrigger und scriptmanager ans framework angepasst

File:
1 edited

Legend:

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

    r9235 r9241  
    1717#include "script_class.h"
    1818#include "luaincl.h"
    19 
     19#include "debug.h"
    2020#include "util/loading/resource_manager.h"
    2121
     
    8787   if(currentFile.length() != 0)
    8888   {
    89      printf("Could not load %s because an other file is already loaded: %s\n",filename.c_str(), currentFile.c_str());
     89     PRINT(1)("Could not load %s because an other file is already loaded: %s\n",filename.c_str(), currentFile.c_str());
    9090     return false;
    9191    }
     
    104104     else
    105105     {
    106        printf("ERROR while loading file %s: \n",filename.c_str());
     106       PRINT(1)("ERROR while loading file %s: \n",filename.c_str());
    107107       reportError(error);
    108108     }
     
    111111   else
    112112   {
    113      printf("ERROR while loading file %s: \n",filename.c_str());
     113     PRINT(1)("ERROR while loading file %s: \n",filename.c_str());
    114114     reportError(error);
    115115   }
     
    150150 bool Script::executeFile()
    151151 {
    152    printf("WARNING: script.executeFile is not implemented yet");
     152   PRINT(2)("WARNING: script.executeFile is not implemented yet");
    153153   /*if(currentFile.length() != 0)
    154154   {
     
    183183   }
    184184   else
    185      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());
     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());
    186186   return false;
    187187 }
     
    195195    if(error != 0)
    196196    {
    197      printf("ERROR while executing function %s: \n",currentFunction.c_str());
     197      PRINT(1)("ERROR while executing function %s: \n",currentFunction.c_str());
    198198     reportError(error);
    199199     //clean up
     
    210210   }
    211211   else
    212      printf("Error: no function selected.\n");
     212     PRINT(1)("Error: no function selected.\n");
    213213
    214214   return false;
     
    227227   else
    228228   {
    229     printf("Couldn't add parameter because the wrong function is selected: %s instead of %s\n", currentFunction.c_str(), toFunction.c_str());
     229     PRINT(1)("Couldn't add parameter because the wrong function is selected: %s instead of %s\n", currentFunction.c_str(), toFunction.c_str());
    230230    return false;
    231231   }
     
    244244   else
    245245   {
    246      printf("Couldn't add parameter because the wrong function is selected: %s instead of %s\n", currentFunction.c_str(), toFunction.c_str());
     246     PRINT(1)("Couldn't add parameter because the wrong function is selected: %s instead of %s\n", currentFunction.c_str(), toFunction.c_str());
    247247     return false;
    248248   }
     
    260260   else
    261261   {
    262      printf("Couldn't add parameter because the wrong function is selected: %s instead of %s\n", currentFunction.c_str(), toFunction.c_str());
     262     PRINT(1)("Couldn't add parameter because the wrong function is selected: %s instead of %s\n", currentFunction.c_str(), toFunction.c_str());
    263263     return false;
    264264   }
     
    295295     }
    296296     else
    297        printf("ERROR: Form %s : trying to retreive non bolean value",this->currentFile.c_str());
     297       PRINT(1)("ERROR: Form %s : trying to retreive non bolean value",this->currentFile.c_str());
    298298   }
    299299   return returnValue;
Note: See TracChangeset for help on using the changeset viewer.