error "bad animation number"


(kat) #1

Getting the following error dropping RtCW back to main screen when testing a custom single player, does anyone know what this error means?

Bad animation number (CG_SLFA): 45

“cg_slfa” seems to relate to “cg_SetLerpFrameAnimation” for player animation sequences (cf. starting line 1116) but I’m not sure why it’s occurring - it happens when firing at the second of two AI in a room (no matter the order it’s always the second one shot that results in the error). AFAICT there’s nothing unusual about the room or the events that happen in it.

Any ideas?


(-SSF-Sage) #2

Sounds like you installed it wrong and it does not load a needed a .dll or pk3.


(Eugeny) #3

No need animation in the character models


(ronboy) #4

Hello, Kat. This error usually occurs with AI that are using a skin with limited animations. To name a few: director, jack, Higgs, Murphy, bj). If you are using normal AI, like an infantryss soldier, then I have no clue what the problem could be.


(kat) #5

Cheers guys.

@ronboy: yes the AI is just a standard infantryss using one of the available skins. Not using any custom AI content other than the level itself. The problem doesn’t happen until the player fires at the AI rather than the other way around which is why this is slightly puzzling.

@Eugeny: the ‘player’ has a number of animations for weapon actions and syncing those together. This problem is somehow related to the way those are being used in this instance.

@-SSF- Sage: the map this happens in is the second of three custom maps, the other two haven’t exhibited the problem when tested so it’s unlikely to be an installation or access issue per say (it would have happened before in more complex areas of interaction).


(kat) #6

Still not entirely sure why the error happens but it seems to be related to the way brush based triggers are spawned into game where the player is standing - setting a wait value doesn’t seem to solve the problem as the brush is triggered at the same moment its spawned. Removing the trigger stopped the problem from happening but it’s not entirely a certainty the actual cause. Had to readjust the sequence that plays out to work around the problem :confused:


(ronboy) #7

You have more experience than me, kat. Maybe this is a bug that was never addressed?


(ailmanki) #8

Well despite my bad knowledge on the language used C? or C++… lol

The error you get means that newAnimation is set to the value 45. So in this case, it checks if the modelinfo contains an animation number with that value. Apparently that model is missing the animation associated to that value.
You should be able to verify this with some model viewer? Or maybe its text files defining the animations, I don’t know enough about rtcw.

if ( newAnimation < 0 || newAnimation >= ci->modelInfo->numAnimations ) {
                CG_Error( "Bad animation number (CG_SLFA): %i", newAnimation );
}

(kat) #9

Cheers guys.

@ailmanki: That’s the trouble, looking through the various wolfanim.cfg files there doesn’t appear to be (haven’t found) a value of “45” (I’m assuming in a general sense the value refers to an animation with a frame length of ‘45’). Aside from that the AI and other character related content hasn’t been modified other than assigning skins to Entities in Radiant.

The problem has been worked around for now (but not necessarily resolved) so it no longer happens in this particular section of the level. Very strange though :confused: