Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10369 in orxonox.OLD for branches


Ignore:
Timestamp:
Jan 25, 2007, 4:42:51 PM (18 years ago)
Author:
snellen
Message:

Added some errormessages in script.cc

Location:
branches/scriptchanges.new/src
Files:
2 edited

Legend:

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

    r10353 r10369  
    111111   if(currentFile.length() != 0)
    112112   {
    113      printf("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());
     113     printf("ERROR IN SCRIPT %s :  Could not load %s because an other file is already loaded: %s\n",currentFile.c_str(),filename.c_str(), currentFile.c_str());
    114114     return false;
    115115    }
     
    128128     else
    129129     {
    130        printf("SCRIPT %s : ERROR: while loading file %s: \n",currentFile.c_str(),filename.c_str());
    131130       reportError(error);
    132131     }
     
    135134   else
    136135   {
    137      printf("SCRIPT %s : ERROR: while loading file %s: \n",currentFile.c_str(),filename.c_str());
    138136     reportError(error);
    139137   }
    140138
    141    printf("SCRIPT : ERROR: while loading file %s \n",filename.c_str());
     139   printf("ERROR IN SCRIPT:  Could not load file %s \n",filename.c_str());
    142140   return false;
    143141 }
     
    166164        tmpObj.name = objectName;
    167165        registeredObjects.push_back(tmpObj);
    168      }
    169    }
     166        return;
     167     }
     168   }
     169   printf("ERROR IN SCRIPT %s: Could not add %s of class %s\n",this->currentFile.c_str(),objectName.c_str(),className.c_str());
    170170 }
    171171
     
    188188        tmpObj.name = objectName;
    189189        registeredObjects.push_back(tmpObj);
    190      }
    191    }
     190        return;
     191     }
     192   }
     193   printf("ERROR IN SCRIPT %s: Could not add %s of class %s\n",this->currentFile.c_str(),objectName.c_str(),className.c_str());
    192194 }
    193195
     
    229231   }
    230232   else
    231      printf("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());
     233     printf("ERROR IN SCRIPT %s :  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());
    232234   return false;
    233235 }
     
    256258   }
    257259   else
    258      PRINTF(1)("SCRIPT '%s' : no function selected.\n",currentFile.c_str());
     260     PRINTF(1)("SCRIPT '%s' : No function selected.\n",currentFile.c_str());
    259261
    260262   return false;
     
    273275   else
    274276   {
    275      printf("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());
     277     printf("ERROR IN SCRIPT %s :  Couldn't add parameter because the wrong function is selected: %s instead of %s\n",currentFile.c_str(), currentFunction.c_str(), toFunction.c_str());
    276278    return false;
    277279   }
     
    290292   else
    291293   {
    292      printf("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());
     294     printf("ERROR IN SCRIPT %s :  Couldn't add parameter because the wrong function is selected: %s instead of %s\n",currentFile.c_str(), currentFunction.c_str(), toFunction.c_str());
    293295     return false;
    294296   }
     
    306308   else
    307309   {
    308      printf("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());
     310     printf("ERROR IN SCRIPT %s : Couldn't add parameter because the wrong function is selected: %s instead of %s\n",currentFile.c_str(), currentFunction.c_str(), toFunction.c_str());
    309311     return false;
    310312   }
     
    341343     }
    342344     else
    343        printf("SCRIPT %s : ERROR: Trying to retreive non bolean value\n",this->currentFile.c_str());
     345       printf("ERROR IN SCRIPT %s : Trying to retreive non bolean value\n",this->currentFile.c_str());
    344346   }
    345347   return returnValue;
     
    394396  const char *msg = lua_tostring(luaState, -1);
    395397  if (msg == NULL) msg = "(error with no message)\n";
    396   printf("ERROR: %s\n", msg);
     398  printf("ERROR IN SCRIPT %s : %s\n",currentFile.c_str(), msg);
    397399  lua_pop(luaState, 1);
    398400 }
  • branches/scriptchanges.new/src/world_entities/creatures/fps_player.cc

    r10340 r10369  
    342342  velocity *= 100;
    343343
     344  if( this->bJump)
     345  {
     346    printf("position:( %f, %f, %f ) \n", this->getAbsCoorX(), this->getAbsCoorY(), this->getAbsCoorZ());
     347  }
    344348  if( this->getModel( 0) != NULL && this->getModel(0)->isA(InteractiveModel::staticClassID()))
    345349  {
Note: See TracChangeset for help on using the changeset viewer.