diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/mapreg_sql.c | 5 | ||||
-rw-r--r-- | src/map/script.c | 17 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c index 6df614aac..c2a35f930 100644 --- a/src/map/mapreg_sql.c +++ b/src/map/mapreg_sql.c @@ -263,8 +263,11 @@ void mapreg_reload(void) { db_clear(mapreg->db); db_clear(mapreg->str_db); - if( mapreg->array_db ) + if( mapreg->array_db ) { mapreg->array_db->destroy(mapreg->array_db,script->array_free_db); + mapreg->array_db = NULL; + } + mapreg->load(); } 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; |