From 7df9962a72cc51d826e01d3ff0265069da62ac17 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Tue, 13 Dec 2016 09:10:07 +0100 Subject: [PATCH] Follow up to 9333921 Thanks to @Playtester's friend Ash for reporting this. --- src/map/script.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/map/script.c b/src/map/script.c index 78cda096b4..b45b356036 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -7801,16 +7801,17 @@ BUILDIN_FUNC(readparam) if( script_hasdata(st, 3) ){ if( script_isint(st, 3) ){ - if( !script_charid2sd(3, sd) ){ - script_pushint(st, -1); - return SCRIPT_CMD_FAILURE; - } + script_charid2sd(3, sd); }else{ - if( !script_nick2sd(3, sd) ){ - script_pushint(st, -1); - return SCRIPT_CMD_FAILURE; - } + script_nick2sd(3, sd); } + }else{ + sd = script_rid2sd(st); + } + + if( !sd ){ + script_pushint(st, -1); + return SCRIPT_CMD_FAILURE; } // If you use a parameter, return the value behind it