diff options
author | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-03-03 08:40:24 +0000 |
---|---|---|
committer | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-03-03 08:40:24 +0000 |
commit | 8bd7139e1a25f842dd460937287f50f0b7fb6b5b (patch) | |
tree | 530bc04509fd7dab0324b07b211b66f64e511b83 /src/map | |
parent | c535a97d4832b1ed485ec129f941aa89fa3fbd3d (diff) | |
download | hercules-8bd7139e1a25f842dd460937287f50f0b7fb6b5b.tar.gz hercules-8bd7139e1a25f842dd460937287f50f0b7fb6b5b.tar.bz2 hercules-8bd7139e1a25f842dd460937287f50f0b7fb6b5b.tar.xz hercules-8bd7139e1a25f842dd460937287f50f0b7fb6b5b.zip |
- Fixed typo in script.c
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5443 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/script.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/map/script.c b/src/map/script.c index d32a6492b..49b289186 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -10532,28 +10532,28 @@ static int script_load_mapreg(void) return -1;
}
ShowInfo("Success! Returning results ...\n");
- mapregsql_res = mysql_store_result(&mmysql_handle);
- if (mapregsql_res) {
- while ((mapregsql_row = mysql_fetch_row(mapregsql_res))) {
+ sql_res = mysql_store_result(&mmysql_handle);
+ if (sql_res) {
+ while ((sql_row = mysql_fetch_row(sql_res))) {
char buf1[33], *p = NULL;
int i,v,s;
- strcpy(buf1,mapregsql_row[0]);
+ strcpy(buf1,sql_row[0]);
if( buf1[strlen(buf1)-1]=='$' ){
- i = atoi(mapregsql_row[1]);
- p=(char *)aCallocA(strlen(mapregsql_row[2]) + 1,sizeof(char));
- strcpy(p,mapregsql_row[2]);
+ i = atoi(sql_row[1]);
+ p=(char *)aCallocA(strlen(sql_row[2]) + 1,sizeof(char));
+ strcpy(p,sql_row[2]);
s= add_str((unsigned char *) buf1);
idb_put(mapregstr_db,(i<<24)|s,p);
}else{
s= add_str((unsigned char *) buf1);
- v= atoi(mapregsql_row[2]);
- i = atoi(mapregsql_row[1]);
+ v= atoi(sql_row[2]);
+ i = atoi(sql_row[1]);
idb_put(mapreg_db,(i<<24)|s,(void *)v);
}
}
}
ShowInfo("Freeing results...\n");
- mysql_free_result(mapregsql_res);
+ mysql_free_result(sql_res);
mapreg_dirty=0;
perfomance = (gettick_nocache() - perfomance) / 1000;
ShowInfo("SQL Mapreg Loading Completed Under %d Seconds.\n",perfomance);
@@ -10582,7 +10582,7 @@ static int script_save_mapreg_intsub(DBKey key,void *data,va_list ap) char *name=str_buf+str_data[num].str;
if ( name[1] != '@') {
sprintf(tmp_sql,"UPDATE `%s` SET `%s`='%d' WHERE `%s`='%s' AND `%s`='%d'",mapregsql_db,mapregsql_db_value,(int)data,mapregsql_db_varname,name,mapregsql_db_index,i);
- if(mysql_query(&mmyregsql_handle, tmp_sql) ) {
+ if(mysql_query(&mmysql_handle, tmp_sql) ) {
ShowSQL("DB error - %s\n",mysql_error(&mmysql_handle));
ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
}
|