patch 9.0.2012: Vim9: error message can be more accurate

Problem:  Vim9: error message can be more accurate
Solution: Fix the error messages

Fix message for some single use error messages.

closes: #13312

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
diff --git a/src/eval.c b/src/eval.c
index 93109ef..8b26eb1 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1375,9 +1375,9 @@
 		      && v_type != VAR_OBJECT
 		      && v_type != VAR_CLASS)
 	{
-	    // TODO: have a message with obj/class, not just dict,
 	    if (!quiet)
-		semsg(_(e_dot_can_only_be_used_on_dictionary_str), name);
+		semsg(_(e_dot_not_allowed_after_str_str),
+						vartype_name(v_type), name);
 	    return NULL;
 	}
 	if (v_type != VAR_LIST
@@ -1386,9 +1386,9 @@
 		&& v_type != VAR_OBJECT
 		&& v_type != VAR_CLASS)
 	{
-	    // TODO: have a message with obj/class, not just dict/list/blob,
 	    if (!quiet)
-		emsg(_(e_can_only_index_list_dictionary_or_blob));
+		semsg(_(e_index_not_allowed_after_str_str),
+						vartype_name(v_type), name);
 	    return NULL;
 	}