Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 3, 2007, 11:55:06 AM (18 years ago)
Author:
snellen
Message:

script_trigger: execution of script aborts now when something goes wrong

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/scriptimprovements/src/world_entities/script_trigger.cc

    r10381 r10564  
    213213       //testScriptingFramework();
    214214    if(!(script->selectFunction(this->functionName,returnCount)) )
     215     {
    215216      PRINT(1)("ERROR SCRTIPTTRIGGER : Selection of %s in %s failed.\n",functionName.c_str(), script->getFileName().c_str());
    216 
    217     script->pushParam( timestep, this->functionName);
     217      return;
     218     }
     219
     220    if (! (script->pushParam( timestep, this->functionName)) )
     221      return;
    218222
    219223    if( !(script->executeFunction()) )
     224     {
    220225      PRINT(1)("ERROR SCRTIPTTRIGGER : Execution of %s in %s failed.\n",functionName.c_str(), script->getFileName().c_str());
    221 
     226      return;
     227     }
    222228    scriptFinished = script->getReturnedBool();
    223229  }
Note: See TracChangeset for help on using the changeset viewer.