summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-01-11 18:22:42 -0200
committershennetsind <ind@henn.et>2014-01-11 18:23:27 -0200
commit65a55ea396c44e263481302f8016fcf8b0e47a70 (patch)
treed0bde72f18534bdfe997b617620e19109b39324b /src/map/script.c
parentab942065240450c3d2824a8a307f8a1b9bcf9516 (diff)
downloadhercules-65a55ea396c44e263481302f8016fcf8b0e47a70.tar.gz
hercules-65a55ea396c44e263481302f8016fcf8b0e47a70.tar.bz2
hercules-65a55ea396c44e263481302f8016fcf8b0e47a70.tar.xz
hercules-65a55ea396c44e263481302f8016fcf8b0e47a70.zip
Follow up 82b583b5ef4e729ad2c3c74b26adce16a145605a
Fixed mapreg reload issue, sql_query not returning results, and caused deletearray to no longer display error messages when the array in question is not available. Special Thanks to Haruna, ossi0110 Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 7b640a237..5ed09b52a 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -5536,8 +5536,8 @@ BUILDIN(setarray)
{
struct script_data* data;
const char* name;
- int32 start;
- int32 end;
+ uint32 start;
+ uint32 end;
int32 id;
int32 i;
TBL_PC* sd = NULL;
@@ -5587,8 +5587,8 @@ BUILDIN(cleararray)
{
struct script_data* data;
const char* name;
- int32 start;
- int32 end;
+ uint32 start;
+ uint32 end;
int32 id;
void* v;
TBL_PC* sd = NULL;
@@ -5643,7 +5643,7 @@ BUILDIN(copyarray)
int32 id2;
void* v;
int32 i;
- int32 count;
+ uint32 count;
TBL_PC* sd = NULL;
data1 = script_getdata(st, 2);
@@ -5780,10 +5780,7 @@ BUILDIN(deletearray)
st->state = END;
return false;// not a variable
} else if ( !(sa = idb_get(src, id)) ) { /* non-existent array, nothing to empty */
- ShowError("script:deletearray: unknown array\n");
- script->reportdata(data);
- st->state = END;
- return false;// not a variable
+ return true;// not a variable
}
end = script->array_highest_key(st,sd,name);
@@ -14436,7 +14433,7 @@ int buildin_query_sql_sub(struct script_state* st, Sql* handle)
const char* query;
struct script_data* data;
const char* name;
- int max_rows = SCRIPT_MAX_ARRAYSIZE; // maximum number of rows
+ unsigned int max_rows = SCRIPT_MAX_ARRAYSIZE; // maximum number of rows
int num_vars;
int num_cols;