diff options
author | mekolat <mekolat@users.noreply.github.com> | 2015-05-20 10:52:39 -0400 |
---|---|---|
committer | mekolat <mekolat@users.noreply.github.com> | 2015-05-20 13:16:34 -0400 |
commit | c0ada60ff51a7166f782a88e56e7a880e4e34650 (patch) | |
tree | 9993605869578066a960a6e4941de99b78277613 /src | |
parent | 29ce27e1557404b6cd03eaab2367c5a698e6ab44 (diff) | |
download | tmwa-c0ada60ff51a7166f782a88e56e7a880e4e34650.tar.gz tmwa-c0ada60ff51a7166f782a88e56e7a880e4e34650.tar.bz2 tmwa-c0ada60ff51a7166f782a88e56e7a880e4e34650.tar.xz tmwa-c0ada60ff51a7166f782a88e56e7a880e4e34650.zip |
add debug for crash
Diffstat (limited to 'src')
-rw-r--r-- | src/map/script-call.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/map/script-call.cpp b/src/map/script-call.cpp index 7092dbc..1514ec2 100644 --- a/src/map/script-call.cpp +++ b/src/map/script-call.cpp @@ -807,10 +807,21 @@ void run_script_main(ScriptState *st, Borrowed<const ScriptBuffer> rootscript) default: if (battle_config.error_log) + { PRINTF("unknown command : %d @ %zu\n"_fmt, c, st->scriptp.pos); - st->state = ScriptEndState::END; - runflag = 0; + if (st->oid) + { + dumb_ptr<npc_data> nd = map_id_is_npc(st->oid); + PRINTF("NPC => %s\n"_fmt, nd->name); + } + if (st->rid) + { + dumb_ptr<map_session_data> sd = script_rid2sd(st); + PRINTF("PC => %s\n"_fmt, sd->status_key.name.to__actual()); + } + } + abort(); break; } if (st->freeloop != 1 && cmdcount > 0 && (--cmdcount) <= 0) |