Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8678 in orxonox.OLD


Ignore:
Timestamp:
Jun 21, 2006, 5:01:17 PM (18 years ago)
Author:
snellen
Message:

fixed segfault when a script isn't loaded correctly

Location:
branches/script_engine/src
Files:
2 edited

Legend:

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

    r8676 r8678  
    33#include "luaincl.h"
    44
    5 //#include "file.h"
     5#include "filesys/file.h"
     6#include "util/loading/resource_manager.h"
    67
    78#include "loading/load_param.h"
     
    5960 {
    6061
     62   File scriptFile;
     63
    6164   if(currentFile.length() != 0)
    6265   {
     
    6972   if(error == 0)
    7073   {
     74     
    7175     error = lua_pcall(luaState, 0, 0, 0);
    7276
    7377     if(error == 0)
    7478     {
     79       printf("Test from Script::loadFile\n");
    7580      currentFile = filename;
    7681      return true;
  • branches/script_engine/src/world_entities/script_trigger.cc

    r8666 r8678  
    181181     if( !(script->executeFunction()) )
    182182       printf("Error ScriptTrigger: Execution of %s in %s failed.\n",functionName.c_str(), script->getFileName().c_str());
     183     
     184     actionFinished = script->getReturnedBool();
    183185     }
    184186     
    185      actionFinished = script->getReturnedBool();
     187     
    186188}
    187189
Note: See TracChangeset for help on using the changeset viewer.