diff options
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/map/script.c b/src/map/script.c index 26d64726c..60f741d6c 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); @@ -10176,10 +10180,8 @@ BUILDIN(warpwaitingpc) /// Detaches a character from a script. /// /// @param st Script state to detach the character from. -static void script_detach_rid(struct script_state* st) -{ - if(st->rid) - { +void script_detach_rid(struct script_state* st) { + if(st->rid) { script_detach_state(st, false); st->rid = 0; } @@ -17864,6 +17866,7 @@ void script_defaults(void) { script->conv_num = conv_num; script->conv_str = conv_str; script->rid2sd = script_rid2sd; + script->detach_rid = script_detach_rid; script->push_val = push_val; script->get_val = get_val; script->get_val2 = get_val2; |