Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8212 in orxonox.OLD for branches/script_engine/src


Ignore:
Timestamp:
Jun 7, 2006, 8:51:05 PM (18 years ago)
Author:
snellen
Message:

corrected mistakes

Location:
branches/script_engine/src/lib/script_engine
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/script_engine/src/lib/script_engine/script_manager.cc

    r8211 r8212  
    9595
    9696
    97 Script* ScriptManager::getScriptByFile(std::string& file)
     97Script* ScriptManager::getScriptByFile(const std::string& file)
    9898{
    9999  if(getScripts())
  • branches/script_engine/src/lib/script_engine/script_manager.h

    r8208 r8212  
    2121  /// LOADING
    2222  virtual void loadParams(const TiXmlElement* root);
    23  
     23
    2424  /// QUERRYING
    25   Script* getScriptByFile(std::string& file);
    26  
     25  Script* getScriptByFile(const std::string& file);
    2726
    28  
     27
     28
    2929 private:
    3030
     
    3333   void  createScripts(const TiXmlElement* scripts);
    3434   void  createTriggers(const TiXmlElement* triggers);
    35    
     35
    3636   bool getTriggers();
    3737   bool getScripts();
  • branches/script_engine/src/lib/script_engine/script_trigger.cc

    r8211 r8212  
    2222  if(root != NULL)
    2323  {
    24   WorldEntity ::loadParams(root);
     24    WorldEntity ::loadParams(root);
    2525
    26    { LoadParam(root, "file", this, ScriptTrigger, setScript)
     26    LoadParam(root, "file", this, ScriptTrigger, setScript)
    2727        .describe("the fileName of the script, that should be triggered by this script trigger")
    2828        .defaultValues("");
     
    4646        .defaultValues("");
    4747
    48     }
    49     timer = delay;
     48
    5049  }
    5150
     
    107106     {
    108107     if(!(script->selectFunction(this->functionName,0)) )
    109        printf("Error ScriptTrigger: Selection of %s in %s failed.\n",functionName.c_str(), scriptFile.c_str());
     108       printf("Error ScriptTrigger: Selection of %s in %s failed.\n",functionName.c_str(), script->getFileName().c_str());
    110109     if( !(script->executeFunction()) )
    111        printf("Error ScriptTrigger: Execution of %s in %s failed.\n",functionName.c_str(),scriptFile.c_str());
     110       printf("Error ScriptTrigger: Execution of %s in %s failed.\n",functionName.c_str(), script->getFileName().c_str());
    112111     }
    113112}
Note: See TracChangeset for help on using the changeset viewer.