Explorar o código

Merge pull request #62895 from KoBeWi/callables_exist_you_know

George Marques %!s(int64=3) %!d(string=hai) anos
pai
achega
dc5a6362c1
Modificáronse 1 ficheiros con 1 adicións e 5 borrados
  1. 1 5
      modules/gdscript/gdscript_vm.cpp

+ 1 - 5
modules/gdscript/gdscript_vm.cpp

@@ -1032,11 +1032,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
 #endif
 #endif
 #ifdef DEBUG_ENABLED
 #ifdef DEBUG_ENABLED
 				if (!valid) {
 				if (!valid) {
-					if (src->has_method(*index)) {
-						err_text = "Invalid get index '" + index->operator String() + "' (on base: '" + _get_var_type(src) + "'). Did you mean '." + index->operator String() + "()' or funcref(obj, \"" + index->operator String() + "\") ?";
-					} else {
-						err_text = "Invalid get index '" + index->operator String() + "' (on base: '" + _get_var_type(src) + "').";
-					}
+					err_text = "Invalid get index '" + index->operator String() + "' (on base: '" + _get_var_type(src) + "').";
 					OPCODE_BREAK;
 					OPCODE_BREAK;
 				}
 				}
 				*dst = ret;
 				*dst = ret;