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

This commit is contained in:
Lemongrass3110 2014-12-26 11:09:36 +01:00
parent fe56ff0b06
commit 4e3a94006f

View File

@ -13723,8 +13723,10 @@ BUILDIN_FUNC(movenpc)
x = script_getnum(st,3); x = script_getnum(st,3);
y = script_getnum(st,4); 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; return -1;
}
if (script_hasdata(st,5)) if (script_hasdata(st,5))
nd->ud.dir = script_getnum(st,5) % 8; nd->ud.dir = script_getnum(st,5) % 8;