diff --git a/core/object/object.cpp b/core/object/object.cpp index f276547e7b6..d6937539c77 100644 --- a/core/object/object.cpp +++ b/core/object/object.cpp @@ -903,7 +903,7 @@ void Object::set_meta(const StringName &p_name, const Variant &p_value) { if (E) { E->value = p_value; } else { - ERR_FAIL_COND(!p_name.operator String().is_valid_identifier()); + ERR_FAIL_COND_MSG(!p_name.operator String().is_valid_identifier(), "Invalid metadata identifier: '" + p_name + "'."); Variant *V = &metadata.insert(p_name, p_value)->value; const String &sname = p_name;