I'm trying to convert rAthena Clan system to Herc and now after compiling no error shows up until when i run the server the char server stopped. I'm using windows btw.
I found what causing it but dont know why.
If I add
inter_clan->sql_init();
to
int inter_init_sql(const char *file)
the char server will stopped working
so here's the whole code
int inter_init_sql(const char *file) { inter->config_read(file, false); //DB connection initialized inter->sql_handle = SQL->Malloc(); ShowInfo("Connect Character DB server.... (Character Server)\n"); if( SQL_ERROR == SQL->Connect(inter->sql_handle, char_server_id, char_server_pw, char_server_ip, (uint16)char_server_port, char_server_db) ) { Sql_ShowDebug(inter->sql_handle); SQL->Free(inter->sql_handle); exit(EXIT_FAILURE); } if( *default_codepage ) { if( SQL_ERROR == SQL->SetEncoding(inter->sql_handle, default_codepage) ) Sql_ShowDebug(inter->sql_handle); } wis_db = idb_alloc(DB_OPT_RELEASE_DATA); inter_guild->sql_init(); inter_storage->sql_init(); inter_party->sql_init(); inter_pet->sql_init(); inter_homunculus->sql_init(); inter_mercenary->sql_init(); inter_elemental->sql_init(); inter_mail->sql_init(); inter_auction->sql_init(); inter_clan->sql_init(); geoip->init(); inter->msg_config_read("conf/messages.conf", false); return 0; }
here's my int_clan.c
http://upaste.me/97313640759e978d3
and my int_clan.h