Original message (verbatim)
Animation speed cannot be negative (%d).
Placeholders such as %s / %d are kept verbatim from the engine source and are not replaced with concrete values.
Trigger
Godot 4.x runtime/editor script: SpriteFrames.set_animation_speed receives a negative fps value.
Typical cause
set_animation_speed first validates p_fps < 0; ERR_FAIL_COND_MSG rejects the negative value before looking up the animation.
Step-by-step fix
- Pass an fps >= 0.
- For reverse playback, use a negative AnimatedSprite2D speed_scale instead of setting animation fps to negative.
Source links
- https://raw.githubusercontent.com/godotengine/godot/master/scene/resources/sprite_frames.cpp#145
- https://docs.godotengine.org/en/stable/classes/class_spriteframes.html
Per-entry sources and capture date are listed at /sources#G11.
Related errors
Related Godot errors
Need an offline quick-reference checklist?
Atlas error library Pro pack: 123 error references (110 single + 13 merged) plus a quick-fix guide, $19 one-time purchase, delivered as electronic files.
Back to the all-errors index Checkout and buy the Pro pack — $19.00