Sfoglia il codice sorgente

Follow up to 9333921

Thanks to @Playtester's friend Ash for reporting this.
Lemongrass3110 8 anni fa
parent
commit
7df9962a72
1 ha cambiato i file con 9 aggiunte e 8 eliminazioni
  1. 9 8
      src/map/script.c

+ 9 - 8
src/map/script.c

@@ -7801,16 +7801,17 @@ BUILDIN_FUNC(readparam)
 
 	if( script_hasdata(st, 3) ){
 		if( script_isint(st, 3) ){
-			if( !script_charid2sd(3, sd) ){
-				script_pushint(st, -1);
-				return SCRIPT_CMD_FAILURE;
-			}
+			script_charid2sd(3, sd);
 		}else{
-			if( !script_nick2sd(3, sd) ){
-				script_pushint(st, -1);
-				return SCRIPT_CMD_FAILURE;
-			}
+			script_nick2sd(3, sd);
 		}
+	}else{
+		sd = script_rid2sd(st);
+	}
+	
+	if( !sd ){
+		script_pushint(st, -1);
+		return SCRIPT_CMD_FAILURE;
 	}
 
 	// If you use a parameter, return the value behind it