From b5d4555a74348d9f1c3f2c824d3117c7121b7d72 Mon Sep 17 00:00:00 2001 From: ai4rei Date: Tue, 17 May 2011 05:59:49 +0000 Subject: * Improved error reporting during monster database and spawn data reading. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14827 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/npc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/map/npc.c') diff --git a/src/map/npc.c b/src/map/npc.c index d070b6886..8bedeb669 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2734,13 +2734,13 @@ static const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const c // check monster ID if exists! if( mobdb_checkid(class_) == 0 ) { - ShowError("npc_parse_mob: Unknown mob ID : %s %s (file '%s', line '%d').\n", w3, w4, filepath, strline(buffer,start-buffer)); + ShowError("npc_parse_mob: Unknown mob ID %d (file '%s', line '%d').\n", class_, filepath, strline(buffer,start-buffer)); return strchr(start,'\n');// skip and continue } if( num < 1 || num > 1000 ) { - ShowError("npc_parse_mob: Invalid number of monsters (must be inside the range [1,1000]) : %s %s (file '%s', line '%d').\n", w3, w4, filepath, strline(buffer,start-buffer)); + ShowError("npc_parse_mob: Invalid number of monsters %d, must be inside the range [1,1000] (file '%s', line '%d').\n", num, filepath, strline(buffer,start-buffer)); return strchr(start,'\n');// skip and continue } @@ -2786,7 +2786,7 @@ static const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const c } if(mob.delay1>0xfffffff || mob.delay2>0xfffffff) { - ShowError("npc_parse_mob: wrong monsters spawn delays : %s %s (file '%s', line '%d').\n", w3, w4, filepath, strline(buffer,start-buffer)); + ShowError("npc_parse_mob: Invalid spawn delays %u %u (file '%s', line '%d').\n", mob.delay1, mob.delay2, filepath, strline(buffer,start-buffer)); return strchr(start,'\n');// skip and continue } @@ -2801,7 +2801,7 @@ static const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const c //Verify dataset. if( !mob_parse_dataset(&mob) ) { - ShowError("npc_parse_mob: Invalid dataset : %s %s (file '%s', line '%d').\n", w3, w4, filepath, strline(buffer,start-buffer)); + ShowError("npc_parse_mob: Invalid dataset for monster ID %d (file '%s', line '%d').\n", class_, filepath, strline(buffer,start-buffer)); return strchr(start,'\n');// skip and continue } -- cgit v1.2.3-70-g09d2