Getting an Animation not found error, but the correct animation is playing

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Socrates

I’m working on a 2D platformer and whenever my character jumps, I get an error message that says: Animation not found: jumping. There is definitely a jumping animation, and the animation even seems to play, and all the other animations seem to play normally but I get the error message every frame the character is in the air, along with a drop in the framerate to around 1fps. (The error also occurs for a falling animation, but not for the walking, running, and standing animations). What could be causingg this? I checked to make sure the names of the animations are consistent with the strings in code, but can’t think of anything else.

Can you post a screenshot of your animation player with its list of animations, as well as the line of code where the error is happening (and its surrounding context)?

Diet Estus | 2018-04-13 18:47

Here is a screenshot of the animation player tab, and the relevant code, but nothing complicated is happening: Imgur: The magic of the Internet

Edit: nm, I was doing this in this in the weapon animation code (using the player character’s new_anim variable instead of the new_weapon_anim variable: Imgur: The magic of the Internet
Out of curiosity, is there a way to see where in the code an error message is being generated? The Animation not found error just gave me a timestamp.

Socrates | 2018-04-13 19:25

Don’t you see something like this?

Diet Estus | 2018-04-13 20:03

There was nothing in the stack trace. Do I have to click somewhere to show it?

Edit: ok I think it’s because the weapon is stored in an autoload script, the stack trace was just telling me there was an error in an object in the autoload script, but not which line of code. thx for the help!

Socrates | 2018-04-13 20:06

I believe you have to click on the error (on the left), and this will populate the stack trace.

Diet Estus | 2018-04-13 20:07

oh yeah that works! thanks a lot!

Socrates | 2018-04-13 20:12