summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-10-01 21:26:04 -0400
committergumi <git@gumi.ca>2018-10-01 21:29:38 -0400
commitb71f15256feed9aeadee06b712464594be9addbf (patch)
treef4e688651c7840f56d8996422a6681efd908a312 /src/map
parent852c13305f67948531bd0277eb1922dbd02b1f26 (diff)
downloadhercules-b71f15256feed9aeadee06b712464594be9addbf.tar.gz
hercules-b71f15256feed9aeadee06b712464594be9addbf.tar.bz2
hercules-b71f15256feed9aeadee06b712464594be9addbf.tar.xz
hercules-b71f15256feed9aeadee06b712464594be9addbf.zip
allow buildin_getd to work with constants and params
this is highly discouraged, but it should still work
Diffstat (limited to 'src/map')
-rw-r--r--src/map/script.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index b787d0138..191b32195 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -17870,7 +17870,9 @@ static BUILDIN(getd)
id = script->add_variable(varname);
- if (script->str_data[id].type != C_NAME) {
+ if (script->str_data[id].type != C_NAME && // variable
+ script->str_data[id].type != C_PARAM && // param
+ script->str_data[id].type != C_INT) { // constant
ShowError("script:getd: `%s` is already used by something that is not a variable.\n", varname);
st->state = END;
return false;