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.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 019b17cff..79199858a 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -2278,10 +2278,9 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
/// Returns the player attached to this script, identified by the rid.
/// If there is no player attached, the script is terminated.
-TBL_PC *script_rid2sd(struct script_state *st)
-{
- TBL_PC *sd=map_id2sd(st->rid);
- if(!sd){
+TBL_PC *script_rid2sd(struct script_state *st) {
+ TBL_PC *sd;
+ if( !( sd = map_id2sd(st->rid) ) ){
ShowError("script_rid2sd: fatal error ! player not attached!\n");
script_reportfunc(st);
script_reportsrc(st);