From 8b397b940a270a4e4107f76614339742a8c5a257 Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 19 Sep 2006 17:23:22 +0000 Subject: - Made the report_Src function also report name of non-bl objects. - The double continuation error will now display both scripts that triggered it. - Loading the storage from the char-server will fail if player is already tagged in final save state. - Removed setting ban_spoof_namer, sending invalid global-talk packets will now just kick the player out of the server. - Added BL_NPC support to status_get_name git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8812 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/script.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/map/script.c') diff --git a/src/map/script.c b/src/map/script.c index 73bf0d7d0..ebe8e060d 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -224,9 +224,9 @@ static void report_src(struct script_state *st) { break; default: if (bl->m >=0) - ShowDebug("Source (Non-NPC): type %d at %s (%d,%d)\n", bl->type, map[bl->m].name, bl->x, bl->y); + ShowDebug("Source (Non-NPC type %d): name %s at %s (%d,%d)\n", bl->type, status_get_name(bl), map[bl->m].name, bl->x, bl->y); else - ShowDebug("Source (Non-NPC): type %d (invisible/not on a map)\n", bl->type); + ShowDebug("Source (Non-NPC type %d): name %s (invisible/not on a map)\n", bl->type, status_get_name(bl)); break; } } @@ -2729,8 +2729,14 @@ void run_script_main(struct script_state *st) } else if(st->state != END && sd){ //Resume later (st is already attached to player). - if(bk_st) + if(bk_st) { ShowWarning("Unable to restore stack! Double continuation!\n"); + //Report BOTH scripts to see if that can help somehow. + ShowDebug("Previous script (lost):"); + report_src(bk_st); + ShowDebug("Current script:"); + report_src(st); + } } else { //Dispose of script. if (sd) -- cgit v1.2.3-70-g09d2