diff options
Diffstat (limited to 'src/emap/scriptdefines.h')
-rw-r--r-- | src/emap/scriptdefines.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/emap/scriptdefines.h b/src/emap/scriptdefines.h index 69b6e3c..9a21313 100644 --- a/src/emap/scriptdefines.h +++ b/src/emap/scriptdefines.h @@ -76,6 +76,16 @@ return false; \ } +#define getSDReturnS(def) \ + TBL_PC *sd = script->rid2sd(st); \ + if (!sd) \ + { \ + ShowWarning("player not attached\n"); \ + script->reportsrc(st); \ + script_pushstr(st, def); \ + return false; \ + } + #define getInventoryIndex(idx) \ const int n = script_getnum(st, idx); \ if (n < 0 || n >= MAX_INVENTORY) \ |