Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualizackp

Posted 29 January 2013 - 11:04 PM

Thanks the interface method worked pretty cleanly.  I still need a little help, so maybe you can just point me in the right direction. I was trying to create a script object in c++ of a class declared in angelscript with this code:

    asIScriptModule* mod = builder.GetModule();
    int logicTypeId = mod->GetTypeIdByDecl("LogicComponent");
    asIScriptObject* objLogicComp = static_cast<asIScriptObject *>(engine->CreateScriptObject(logicTypeId));
    assert(objLogicComp != NULL);

 

 

and I get this error when calling CreateScriptObject:


(0, 0) : ERR  : Failed in call to function 'Prepare' with 'null' (Code: -6)

 

which leads me to believe that I cant do this either or I'm missing a step that allows me to do this. I verified that the name of the class is the same as the parameter for gettypeidbydecl.. so I'm not sure what the problem is


#3izackp

Posted 29 January 2013 - 11:03 PM

Thanks the interface method worked pretty cleanly.  I still need a little help, so maybe you can just point me in the right direction. I was trying to create a script object in c++ of a class declared in angelscript with this code:

    asIScriptModule* mod = builder.GetModule();
    int logicTypeId = mod->GetTypeIdByDecl("LogicComponent");
    asIScriptObject* objLogicComp = static_cast<asIScriptObject *>(engine->CreateScriptObject(logicTypeId));
    assert(objLogicComp != NULL);

 

 

and I get this error when calling CreateScriptObject:


(0, 0) : ERR  : Failed in call to function 'Prepare' with 'null' (Code: -6)

 

which leads me to believe that I cant do this either or I'm missing a step that allows me to do this.


#2izackp

Posted 29 January 2013 - 11:03 PM

Thanks the interface method worked pretty cleanly.  I still need a little help, so maybe you can just point me in the right direction. I was trying to create a script object in c++ of a class declared in angelscript with this code:

    asIScriptModule* mod = builder.GetModule();
    int logicTypeId = mod->GetTypeIdByDecl("LogicComponent");
    asIScriptObject* objLogicComp = static_cast<asIScriptObject *>(engine->CreateScriptObject(logicTypeId));
    assert(objLogicComp != NULL);

 

 

and I get this error:


(0, 0) : ERR  : Failed in call to function 'Prepare' with 'null' (Code: -6)

 

which leads me to believe that I cant do this either or I'm missing a step that allows me to do this.


#1izackp

Posted 29 January 2013 - 11:02 PM

Thanks the interface method worked pretty cleanly.  I still need a little help, so maybe you can just point me in the right direction. I was trying to create a script object in c++ of a class declared in angelscript with this code:

    asIScriptModule* mod = builder.GetModule();
    int logicTypeId = mod->GetTypeIdByDecl("LogicComponent");
    asIScriptObject* objLogicComp = static_cast<asIScriptObject *>(engine->CreateScriptObject(logicTypeId));
    assert(objLogicComp != NULL);

 

 

and I get this error:


(0, 0) : ERR  : Failed in call to function 'Prepare' with 'null' (Code: -6)

 

which leads me to believe that I cant do either or I'm missing a step that allows me to do this.


PARTNERS