summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/script.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 50e64b8e9..b1f6371ec 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -11282,9 +11282,17 @@ BUILDIN_FUNC(getmapxy)
BUILDIN_FUNC(logmes)
{
const char *str;
- if (log_config.npc <= 0 ) return 0;
+ TBL_PC* sd;
+
+ if( log_config.npc <= 0 )
+ return 0;
+
+ sd = script_rid2sd(st);
+ if( sd == NULL )
+ return 1;
+
str = script_getstr(st,2);
- log_npc(script_rid2sd(st),str);
+ log_npc(sd,str);
return 0;
}