Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10564 in orxonox.OLD


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

script_trigger: execution of script aborts now when something goes wrong

Location:
branches/scriptimprovements/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/scriptimprovements/src/lib/script_engine/lua_vector.cc

    r10562 r10564  
    2323                        ->addMethod("getY", Executor0ret<LuaVector, lua_State*,float>(&LuaVector::getY))
    2424                        ->addMethod("getZ", Executor0ret<LuaVector, lua_State*,float>(&LuaVector::getZ))
    25                         //->addMethod("dot", Executor1ret<Vector, lua_State*,float, Vector>(&Vector::dot))
     25                      //  ->addMethod("dot", Executor1ret<LuaVector, lua_State*,float, LuaVector>(&LuaVector::dot))
    2626                       );
    2727
  • 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.