summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index bc5959003..0ef12f74d 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -2045,7 +2045,11 @@ void script_error(const char* src, const char* file, int start_line, const char*
StrBuf->Init(&buf);
StrBuf->AppendStr(&buf, "\a\n");
- StrBuf->Printf(&buf, "script error on %s line %d\n", file, line);
+ if( line >= 0 )
+ StrBuf->Printf(&buf, "script error on %s line %d\n", file, line);
+ else
+ StrBuf->Printf(&buf, "script error on %s item ID %d\n", file, -line);
+
StrBuf->Printf(&buf, " %s\n", error_msg);
for(j = 0; j < 5; j++ ) {
script_print_line(&buf, linestart[j], NULL, line + j - 5);