From 4e3a94006f5e17f4c175a93df43a451e375e39d4 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Fri, 26 Dec 2014 11:09:36 +0100 Subject: [PATCH] Added an error message for movenpc to report which NPC was not found --- src/map/script.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/map/script.c b/src/map/script.c index 7d513f3b96..2b633015b5 100644 --- a/src/map/script.c +++ b/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;