소스 검색

Fixed bugreport:6459 yet another variable assignment fix, special thanks to joseph for bringing this to our attention.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16625 54d463be-8e91-2dee-dedb-b68131a5f0ec
shennetsind 12 년 전
부모
커밋
7dc591040f
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      src/map/script.c

+ 4 - 2
src/map/script.c

@@ -1192,8 +1192,10 @@ const char* parse_variable(const char* p) {
 		add_scriptl(word);
 	}
 	
-	if( type == C_ADD_PP || type == C_SUB_PP ) {// incremental operator for the method
+	if( type != C_EQ )
 		add_scriptc(C_REF);
+	
+	if( type == C_ADD_PP || type == C_SUB_PP ) {// incremental operator for the method
 		add_scripti(1);
 		add_scriptc(type == C_ADD_PP ? C_ADD : C_SUB);
 	} else {// process the value as an expression
@@ -3398,7 +3400,7 @@ static void script_check_buildin_argtype(struct script_state* st, int func)
 				case 'r':
 					if( !data_isreference(data) )
 					{// variables
-						ShowWarning("Unexpected type for argument %d. Expected variable.\n", idx-1);
+						ShowWarning("Unexpected type for argument %d. Expected variable, got %s.\n", idx-1,script_op2name(data->type));
 						script_reportdata(data);
 						invalid++;
 					}