diff options
author | shennetsind <ind@henn.et> | 2013-06-01 14:11:45 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-06-01 14:11:45 -0300 |
commit | 86e9900db60e06738880a57820125ca169c37520 (patch) | |
tree | 56a85cfd36a1f44add3e5cc9d9fd280618449094 /src/map/script.c | |
parent | a7ad5cc37f1b74708f1982839c4bfd932d0687b9 (diff) | |
download | hercules-86e9900db60e06738880a57820125ca169c37520.tar.gz hercules-86e9900db60e06738880a57820125ca169c37520.tar.bz2 hercules-86e9900db60e06738880a57820125ca169c37520.tar.xz hercules-86e9900db60e06738880a57820125ca169c37520.zip |
Fixed script_rid2sd not being available to HPM
Special Thanks to Shikazu
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 7 |
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); |