diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/script-fun.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index e619169..6dc1510 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -190,6 +190,14 @@ void builtin_callsub(ScriptState *st) static void builtin_return(ScriptState *st) { + if (!(st->stack->stack_datav[st->defsp - 1].is<ScriptDataRetInfo>())) + { + dumb_ptr<npc_data> nd = map_id_is_npc(st->oid); + if(nd) + PRINTF("Deprecated: return outside of callfunc or callsub! @ %s\n"_fmt, nd->name); + else + PRINTF("Deprecated: return outside of callfunc or callsub! (no npc)\n"_fmt); + } #if 0 if (HARG(0)) { // 戻り値有り |