소스 검색

Added info about operator after bespoke error message.

Bil Bas (Spooner) 10 년 전
부모
커밋
748311ec42
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      modules/gdscript/gd_script.cpp

+ 1 - 0
modules/gdscript/gd_script.cpp

@@ -340,6 +340,7 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
 					if (dst->get_type()==Variant::STRING) {
 						//return a string when invalid with the error
 						err_text=*dst;
+						err_text += " in operator '"+Variant::get_operator_name(op)+"'.";
 					} else {
 						err_text="Invalid operands '"+Variant::get_type_name(a->get_type())+"' and '"+Variant::get_type_name(b->get_type())+"' in operator '"+Variant::get_operator_name(op)+"'.";
 					}