summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-10-07 18:27:58 +0200
committerGitHub <noreply@github.com>2018-10-07 18:27:58 +0200
commit71205691cb441e398355944cdad992b6b60053ba (patch)
tree41b209c2ec38393c7e3f965d8fe5ab2f57f92889 /src
parentc0543f29c2f85fdcfa431063ea785a389d140199 (diff)
parent55f666602680b10ab0a3966de96d50c088e58865 (diff)
downloadhercules-71205691cb441e398355944cdad992b6b60053ba.tar.gz
hercules-71205691cb441e398355944cdad992b6b60053ba.tar.bz2
hercules-71205691cb441e398355944cdad992b6b60053ba.tar.xz
hercules-71205691cb441e398355944cdad992b6b60053ba.zip
Merge pull request #2240 from Helianthella/getd-const
allow buildin_getd to work with constants and params
Diffstat (limited to 'src')
-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 be608830f..421def5f9 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -17847,7 +17847,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;