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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 8412d0019..a08d06466 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -9650,10 +9650,11 @@ BUILDIN_FUNC(getcastledata)
BUILDIN_FUNC(setcastledata)
{
- int index=script_getnum(st,3);
- int value=script_getnum(st,4);
+ const char* mapname = mapindex_getmapname(script_getstr(st,2),NULL);
+ int index = script_getnum(st,3);
+ int value = script_getnum(st,4);
- struct guild_castle* gc = guild_mapname2gc( mapindex_getmapname(script_getstr(st,2),NULL) );
+ struct guild_castle* gc = guild_mapname2gc(mapname);
if(gc) {
// Save Data byself First