소스 검색

Added an error message for movenpc to report which NPC was not found

Lemongrass3110 10 년 전
부모
커밋
4e3a94006f
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      src/map/script.c

+ 3 - 1
src/map/script.c

@@ -13723,8 +13723,10 @@ BUILDIN_FUNC(movenpc)
 	x = script_getnum(st,3);
 	y = script_getnum(st,4);
 
-	if ((nd = npc_name2id(npc)) == NULL)
+	if ((nd = npc_name2id(npc)) == NULL){
+		ShowError("script: movenpc: NPC with ID '%s' was not found!\n", npc );
 		return -1;
+	}
 
 	if (script_hasdata(st,5))
 		nd->ud.dir = script_getnum(st,5) % 8;