summaryrefslogtreecommitdiff
path: root/src/map/pet.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/pet.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/pet.c')
-rw-r--r--src/map/pet.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/pet.c b/src/map/pet.c
index 6ec18422c..a8e99df6c 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -1588,6 +1588,7 @@ int read_petdb()
char line[1024];
int i;
int j=0;
+ int lines;
char *filename[]={"db/pet_db.txt","db/pet_db2.txt"};
memset(pet_db,0,sizeof(pet_db));
@@ -1599,7 +1600,9 @@ int read_petdb()
printf("can't read %s\n",filename[i]);
return -1;
}
+ lines = 0;
while(fgets(line,1020,fp)){
+ lines++;
int nameid,i;
char *str[32],*p,*np;
@@ -1647,7 +1650,7 @@ int read_petdb()
pet_db[j].script = NULL;
if((np=strchr(p,'{'))==NULL)
continue;
- pet_db[j].script = parse_script(np,0);
+ pet_db[j].script = parse_script(np,lines);
j++;
}
fclose(fp);