summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/script.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index c36d26626..296008536 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -13270,6 +13270,24 @@ BUILDIN(getmapxy)
script_pushint(st,-1);
return false;
}
+
+ if( !is_string_variable(reference_getname(script_getdata(st, 2))) ) {
+ ShowWarning("script: buildin_getmapxy: %s is not a string variable\n",reference_getname(script_getdata(st, 2)));
+ script_pushint(st,-1);
+ return false;
+ }
+
+ if( is_string_variable(reference_getname(script_getdata(st, 3))) ) {
+ ShowWarning("script: buildin_getmapxy: %s is a string variable, should be int\n",reference_getname(script_getdata(st, 3)));
+ script_pushint(st,-1);
+ return false;
+ }
+
+ if( is_string_variable(reference_getname(script_getdata(st, 4))) ) {
+ ShowWarning("script: buildin_getmapxy: %s is a string variable, should be int\n",reference_getname(script_getdata(st, 4)));
+ script_pushint(st,-1);
+ return false;
+ }
// Possible needly check function parameters on C_STR,C_INT,C_INT
type=script_getnum(st,5);
@@ -13350,7 +13368,7 @@ BUILDIN(getmapxy)
num=st->stack->stack_data[st->start+2].u.num;
name=script->get_str(script_getvarid(num));
prefix=*name;
-
+
if(not_server_variable(prefix))
sd=script->rid2sd(st);
else