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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index a56135dd8..f63be3fb5 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -12104,7 +12104,10 @@ BUILDIN_FUNC(getmonsterinfo)
mob_id = script_getnum(st,2);
if (!mobdb_checkid(mob_id)) {
ShowError("buildin_getmonsterinfo: Wrong Monster ID: %i", mob_id);
- script_pushint(st,-1);
+ if ( !script_getnum(st,3) ) //requested a string
+ script_pushconststr(st,"null");
+ else
+ script_pushint(st,-1);
return -1;
}
mob = mob_db(mob_id);