summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-08-14 12:41:17 -0300
committershennetsind <ind@henn.et>2013-08-14 12:41:17 -0300
commitb4cf8f280cc5cdd027685fb6dd2a2c5692e12115 (patch)
treec68c2ec6e97d1273e7622be34abfc241619f9759 /src/map/script.c
parent0b05acb2fb1f64ec500b9b2ebc9cc9af08f36724 (diff)
downloadhercules-b4cf8f280cc5cdd027685fb6dd2a2c5692e12115.tar.gz
hercules-b4cf8f280cc5cdd027685fb6dd2a2c5692e12115.tar.bz2
hercules-b4cf8f280cc5cdd027685fb6dd2a2c5692e12115.tar.xz
hercules-b4cf8f280cc5cdd027685fb6dd2a2c5692e12115.zip
Fixed Bug #7646
Fixed changing map zones/flag of a instance map crashing, also added IOT_ (Instance Owner Type) constants to db/const.txt Special Thanks to purityz for all the help and test scenarios. http://hercules.ws/board/tracker/issue-7646-bg-mapflag-instance-reloadscript-mapserver-crash/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 04ed0ccce..9e88714fe 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -2284,11 +2284,11 @@ void get_val(struct script_state* st, struct script_data* data)
sd = script_rid2sd(st);
if( sd == NULL ) {// needs player attached
if( postfix == '$' ) {// string variable
- ShowWarning("script:script->get_val: cannot access player variable '%s', defaulting to \"\"\n", name);
+ ShowWarning("script_get_val: cannot access player variable '%s', defaulting to \"\"\n", name);
data->type = C_CONSTSTR;
data->u.str = "";
} else {// integer variable
- ShowWarning("script:script->get_val: cannot access player variable '%s', defaulting to 0\n", name);
+ ShowWarning("script_get_val: cannot access player variable '%s', defaulting to 0\n", name);
data->type = C_INT;
data->u.num = 0;
}
@@ -2327,7 +2327,7 @@ void get_val(struct script_state* st, struct script_data* data)
if ( st->instance_id >= 0 ) {
data->u.str = (char*)idb_get(instances[st->instance_id].vars,reference_getuid(data));
} else {
- ShowWarning("script:script->get_val: cannot access instance variable '%s', defaulting to \"\"\n", name);
+ ShowWarning("script_get_val: cannot access instance variable '%s', defaulting to \"\"\n", name);
data->u.str = NULL;
}
break;
@@ -2382,7 +2382,7 @@ void get_val(struct script_state* st, struct script_data* data)
if( st->instance_id >= 0 )
data->u.num = (int)idb_iget(instances[st->instance_id].vars,reference_getuid(data));
else {
- ShowWarning("script:script->get_val: cannot access instance variable '%s', defaulting to 0\n", name);
+ ShowWarning("script_get_val: cannot access instance variable '%s', defaulting to 0\n", name);
data->u.num = 0;
}
break;