summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-17 10:46:37 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-17 10:46:37 +0000
commit77b5031fc9f41079c772c429c8bff69706fac16b (patch)
tree45a68e3ef4f65e44d5bf67c8ba2018701fc57857 /src/map/script.c
parent26ab8da349bfd32e8bcd632f94bd33beff9fc4a9 (diff)
downloadhercules-77b5031fc9f41079c772c429c8bff69706fac16b.tar.gz
hercules-77b5031fc9f41079c772c429c8bff69706fac16b.tar.bz2
hercules-77b5031fc9f41079c772c429c8bff69706fac16b.tar.xz
hercules-77b5031fc9f41079c772c429c8bff69706fac16b.zip
* Added display script filename when a script error is found while parsing
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1244 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 961c4b5e5..c032fe401 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -14,10 +14,11 @@
#include <time.h>
-#include "socket.h"
-#include "timer.h"
-#include "malloc.h"
-#include "lock.h"
+#include "../common/socket.h"
+#include "../common/timer.h"
+#include "../common/malloc.h"
+#include "../common/lock.h"
+#include "../common/db.h"
#include "map.h"
#include "clif.h"
@@ -31,15 +32,14 @@
#include "npc.h"
#include "pet.h"
#include "intif.h"
-#include "db.h"
#include "skill.h"
#include "chat.h"
#include "battle.h"
#include "party.h"
#include "guild.h"
-#include "lock.h"
#include "atcommand.h"
#include "log.h"
+#include "showmsg.h"
#ifdef MEMWATCH
#include "memwatch.h"
@@ -847,7 +847,11 @@ static void disp_error_message(const char *mes,const unsigned char *pos)
*lineend=0;
}
if(lineend==NULL || pos<lineend){
- printf("%s line %d : ",mes,line);
+ if (current_file) {
+ printf("%s in "CL_WHITE"\'%s\'"CL_RESET" line "CL_WHITE"\'%d\'"CL_RESET" : ", mes, current_file, line);
+ } else {
+ printf("%s line "CL_WHITE"\'%d\'"CL_RESET" : ", mes, line);
+ }
for(i=0;(linestart[i]!='\r') && (linestart[i]!='\n') && linestart[i];i++){
if(linestart+i!=pos)
printf("%c",linestart[i]);