summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 4304aeea7..b37c31c1e 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -9068,8 +9068,13 @@ BUILDIN_FUNC(warpwaitingpc)
*------------------------------------------*/
BUILDIN_FUNC(attachrid)
{
- st->rid=script_getnum(st,2);
- script_pushint(st,(map_id2sd(st->rid)!=NULL));
+ int rid = script_getnum(st,2);
+
+ if (map_id2sd(rid)) {
+ st->rid = rid;
+ script_pushint(st,1);
+ } else
+ script_pushint(st,0);
return 0;
}
/*==========================================