Error code causing game not to start

king21

Member
I'm trying to figure out what this error means. " Fatal Error in load_cached_model, file: data/chars/a/a.txt, line 248, message: Invalid animation name!"
I'm using OpenBoR v3.0 Build 6391, Compile Date: Apr 8 2020.This is lines 231-257 .
{
if(acting_entity->position.x > target->position.x)
{
acting_entity->destx = target->position.x + range - 1;
}
else
{
acting_entity->destx = target->position.x - range + 1;
}
dx = diff(acting_entity->position.x, acting_entity->destx);

if(dx > 150 && validanim(acting_entity, ANI_RUN))
{
acting_entity->velocity.x = acting_entity->modeldata.runspeed;
acting_entity->running &= ~RUN_STATE_START_Z;
acting_entity->running |= RUN_STATE_START_X;
}
else
{
acting_entity->velocity.x = acting_entity->modeldata.speed.x;
}
if(acting_entity->destx < acting_entity->position.x)
{
acting_entity->velocity.x = -acting_entity->velocity.x;
}

//...
 
I'm trying to figure out what this error means. " Fatal Error in load_cached_model, file: data/chars/a/a.txt, line 248, message: Invalid animation name!"
I'm using OpenBoR v3.0 Build 6391, Compile Date: Apr 8 2020.This is lines 231-257 .
{
if(acting_entity->position.x > target->position.x)
{
acting_entity->destx = target->position.x + range - 1;
}
else
{
acting_entity->destx = target->position.x - range + 1;
}
dx = diff(acting_entity->position.x, acting_entity->destx);

if(dx > 150 && validanim(acting_entity, ANI_RUN))
{
acting_entity->velocity.x = acting_entity->modeldata.runspeed;
acting_entity->running &= ~RUN_STATE_START_Z;
acting_entity->running |= RUN_STATE_START_X;
}
else
{
acting_entity->velocity.x = acting_entity->modeldata.speed.x;
}
if(acting_entity->destx < acting_entity->position.x)
{
acting_entity->velocity.x = -acting_entity->velocity.x;
}

//...

That usually means you just have a typo in one your animation names - exactly what the error says. Go over the model sheet carefully and check all your "anim <whatever>"

DC
 
I'm trying to figure out what this error means. " Fatal Error in load_cached_model, file: data/chars/a/a.txt, line 248, message: Invalid animation name!"
I'm using OpenBoR v3.0 Build 6391, Compile Date: Apr 8 2020.This is lines 231-257 .
{
if(acting_entity->position.x > target->position.x)
{
acting_entity->destx = target->position.x + range - 1;
}
else
{
acting_entity->destx = target->position.x - range + 1;
}
dx = diff(acting_entity->position.x, acting_entity->destx);

if(dx > 150 && validanim(acting_entity, ANI_RUN))
{
acting_entity->velocity.x = acting_entity->modeldata.runspeed;
acting_entity->running &= ~RUN_STATE_START_Z;
acting_entity->running |= RUN_STATE_START_X;
}
else
{
acting_entity->velocity.x = acting_entity->modeldata.speed.x;
}
if(acting_entity->destx < acting_entity->position.x)
{
acting_entity->velocity.x = -acting_entity->velocity.x;
}

//...
Where do you copy those kinds of scripts from? They look like they're not in OpenBOR's own C derivative style at all unless it's from the engine source or something
 
Where do you copy those kinds of scripts from? They look like they're not in OpenBOR's own C derivative style at all unless it's from the engine source or something

This is engine code. It's the logic that AI uses for determining when to toward a target. In 3.x, the distance for AI running is hard coded to > 150 pixels from target

DC
 
Maybe the error is here:
C:
if(dx > 150 && validanim(acting_entity, ANI_RUN))

That's engine code @Bloodbane. If it was broken, the engine simply wouldn't compile and we wouldn't be able to release it.

Plus, all it's doing is making a check to see if the target is far enough away and the entity has run animation or not. If it doesn't have a run animation - and most entites don't - it doesn't try to run, simple.

Whatever is causing the problem, it isn't that.

DC
 
Back
Top Bottom