Original message (verbatim)
Index p_coord.y = %d is out of bounds (vframes = %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: the y coordinate passed to Sprite2D.set_frame_coords(Vector2i(x, y)) exceeds vframes (the p_coord.x / hframes version prints when x exceeds hframes); common when switching between two sprite sheets with different row/column counts.
Typical cause
Sprite2D::set_frame_coords runs ERR_FAIL_INDEX checks on p_coord.x and p_coord.y separately; on out-of-bounds it prints the default index message.
Step-by-step fix
- Update hframes and vframes together when switching sprite sheets.
- Keep different state sheets on the same grid row/column count.
- Avoid AnimationPlayer keyframes referencing coordinates that do not exist in the current grid.
Source links
- https://raw.githubusercontent.com/godotengine/godot/master/scene/2d/sprite_2d.cpp#314
- https://raw.githubusercontent.com/godotengine/godot/master/core/error/error_macros.cpp#202
- https://docs.godotengine.org/en/stable/classes/class_sprite2d.html
- https://forum.godotengine.org/t/the-problem-with-the-sprite-sheet-animation-set-frame-coords-index-p-coord-y-6-is-out-of-bounds-vframes-5/74552
Per-entry sources and capture date are listed at /sources#G07.
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