summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Foerster <pydsigner@gmail.com>2015-11-12 23:02:23 -0600
committermekolat <mekolat@users.noreply.github.com>2015-11-13 08:53:33 -0500
commitc2a722b629b08a2eae726ad4b663616c8d0c4231 (patch)
treed0752410d79e51edfada5644ad1ef87f6bccbe95
parentf7c99c70de0f5bd77939966d085ad0da61bfd739 (diff)
downloadtmwa-c2a722b629b08a2eae726ad4b663616c8d0c4231.tar.gz
tmwa-c2a722b629b08a2eae726ad4b663616c8d0c4231.tar.bz2
tmwa-c2a722b629b08a2eae726ad4b663616c8d0c4231.tar.xz
tmwa-c2a722b629b08a2eae726ad4b663616c8d0c4231.zip
Add NPC location information to run_func
-rw-r--r--src/map/script-call.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map/script-call.cpp b/src/map/script-call.cpp
index 83b6f24..0c67ba8 100644
--- a/src/map/script-call.cpp
+++ b/src/map/script-call.cpp
@@ -596,7 +596,12 @@ void run_func(ScriptState *st)
if (!st->stack->stack_datav[st->start].is<ScriptDataFuncRef>())
{
- PRINTF("run_func: not function and command! \n"_fmt);
+ dumb_ptr<npc_data> nd = map_id_is_npc(st->oid);
+ if(nd)
+ PRINTF("run_func: not a function or statement! @ %s\n"_fmt, nd->name);
+ else
+ PRINTF("run_func: not a function or statement! (no npc)\n"_fmt);
+
st->state = ScriptEndState::END;
abort();
}