summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorAnnieRuru <jeankof@ymail.com>2018-04-11 18:10:10 +0800
committerAnnieRuru <jeankof@ymail.com>2018-04-11 18:10:10 +0800
commitc45d7f983bfe8034e11f1d3e5b9b4404afec6b31 (patch)
treebe7354ce8a73a0a88e0d0d798560a39973c5ae05 /src/map/script.c
parent7b097da8b433ea3b768b6c306c12801f7ddef0a5 (diff)
downloadhercules-c45d7f983bfe8034e11f1d3e5b9b4404afec6b31.tar.gz
hercules-c45d7f983bfe8034e11f1d3e5b9b4404afec6b31.tar.bz2
hercules-c45d7f983bfe8034e11f1d3e5b9b4404afec6b31.tar.xz
hercules-c45d7f983bfe8034e11f1d3e5b9b4404afec6b31.zip
*delwall now give a friendly warning to remind non-existent wall
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index d11b6741a..3c5f4a232 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -13998,9 +13998,15 @@ BUILDIN(setwall) {
map->iwall_set(m, x, y, size, dir, shootable, name);
return true;
}
-BUILDIN(delwall) {
+
+BUILDIN(delwall)
+{
const char *name = script_getstr(st,2);
- map->iwall_remove(name);
+
+ if (!map->iwall_remove(name)) {
+ ShowWarning("buildin_delwall: Non-existent '%s' provided.\n", name);
+ return false;
+ }
return true;
}