From 35f28407d9368b47f440a772b60d863b9e5faef5 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Tue, 1 Aug 2023 23:30:21 +0800 Subject: [PATCH] Fix "a number is required" error when printing RID --- scene/2d/tile_map.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 81d82b13bb2..1836cc20b61 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -3276,7 +3276,7 @@ Vector2i TileMap::get_coords_for_body_rid(RID p_physics_body) { return layer->get_coords_for_body_rid(p_physics_body); } } - ERR_FAIL_V_MSG(Vector2i(), vformat("No tiles for the given body RID %d.", p_physics_body)); + ERR_FAIL_V_MSG(Vector2i(), vformat("No tiles for the given body RID %d.", p_physics_body.get_id())); } int TileMap::get_layer_for_body_rid(RID p_physics_body) { @@ -3285,7 +3285,7 @@ int TileMap::get_layer_for_body_rid(RID p_physics_body) { return i; } } - ERR_FAIL_V_MSG(-1, vformat("No tiles for the given body RID %d.", p_physics_body)); + ERR_FAIL_V_MSG(-1, vformat("No tiles for the given body RID %d.", p_physics_body.get_id())); } void TileMap::fix_invalid_tiles() {