Search the Community
Showing results for tags 'woe statistics'.
Found 1 result
-
I'm getting issue after I update my Hercules. I hope some could point me on this piece of code This is the original code + /* [Sanasol] Current WoE Statistics */ + if (SQL_ERROR == SqlStmt_Prepare(stmt, "SELECT `top_damage`, `damage_done`, `damage_received`, `emperium_damage`, `guardian_damage`, `barricade_damage`, `gstone_damage`, `emperium_kill`, `guardian_kill`, `barricade_kill`, `gstone_kill`, `sp_heal_potions`, `hp_heal_potions`, `yellow_gemstones`, `red_gemstones`, `blue_gemstones`, `poison_bottles`, `acid_demostration`, `acid_demostration_fail`, `support_skills_used`, `healing_done`, `wrong_support_skills_used`, `wrong_healing_done`, `sp_used`, `zeny_used`, `spiritb_used`, `ammo_used`, `kill_count`, `death_count`, `score` FROM `char_woe_statistics` WHERE `char_id` = ? and `date`=CURRENT_DATE()") + || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, 0) + || SQL_ERROR == SQL->StmtExecute(stmt) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_UINT, &p->woe_statistics.top_damage, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_UINT, &p->woe_statistics.damage_done, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_UINT, &p->woe_statistics.damage_received, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_UINT, &p->woe_statistics.emperium_damage, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_UINT, &p->woe_statistics.guardian_damage, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_UINT, &p->woe_statistics.barricade_damage, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_UINT, &p->woe_statistics.gstone_damage, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_USHORT, &p->woe_statistics.emperium_kill, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_USHORT, &p->woe_statistics.guardian_kill, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_USHORT, &p->woe_statistics.barricade_kill, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 10, SQLDT_USHORT, &p->woe_statistics.gstone_kill, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 11, SQLDT_UINT, &p->woe_statistics.sp_heal_potions, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 12, SQLDT_UINT, &p->woe_statistics.hp_heal_potions, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 13, SQLDT_UINT, &p->woe_statistics.yellow_gemstones, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 14, SQLDT_UINT, &p->woe_statistics.red_gemstones, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 15, SQLDT_UINT, &p->woe_statistics.blue_gemstones, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 16, SQLDT_UINT, &p->woe_statistics.poison_bottles, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 17, SQLDT_UINT, &p->woe_statistics.acid_demostration, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 18, SQLDT_UINT, &p->woe_statistics.acid_demostration_fail, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 19, SQLDT_UINT, &p->woe_statistics.support_skills_used, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 20, SQLDT_UINT, &p->woe_statistics.healing_done, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 21, SQLDT_UINT, &p->woe_statistics.wrong_support_skills_used, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 22, SQLDT_UINT, &p->woe_statistics.wrong_healing_done, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 23, SQLDT_UINT, &p->woe_statistics.sp_used, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 24, SQLDT_UINT, &p->woe_statistics.zeny_used, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 25, SQLDT_UINT, &p->woe_statistics.spiritb_used, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 26, SQLDT_UINT, &p->woe_statistics.ammo_used, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 27, SQLDT_USHORT, &p->woe_statistics.kill_count, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 28, SQLDT_USHORT, &p->woe_statistics.death_count, 0, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 29, SQLDT_USHORT, &p->woe_statistics.score, 0, NULL, NULL) + || SQL_SUCCESS != SQL->StmtNextRow(stmt)) + { + p->woe_statistics.score = 2000; + } + strcat(t_msg, " woestats"); + /* [Sanasol] Current WoE Statistics */ but after this update: https://github.com/HerculesWS/Hercules/commit/872844f1d5368329acbbc46c13dc68f3e5b415d7#diff-e4a2452beec0c729136e0da00eaaa6e8 im getting this error in char-server: [Error]: --- failed assertion -------------------------------------------- [Error]: sql.c:479: 'buffer_len == sizeof(int)' in function `Sql_P_BindSqlDataType' [Error]: ./char-server(assert_report+0x83) [0x455f63] [Error]: ./char-server() [0x46813a] [Error]: ./char-server(char_mmo_char_fromsql+0x1e84) [0x41c8b4] [Error]: ./char-server(char_parse_char_select+0x200) [0x420230] [Error]: ./char-server(char_parse_char+0x62a) [0x4226aa] [Error]: ./char-server(do_sockets+0x27e) [0x463b1e] [Error]: ./char-server(main+0x182) [0x413b42] [Error]: /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f77c229bc05] [Error]: ./char-server() [0x413c08] [Error]: --- end failed assertion ---------------------------------------- I tried to revise but still getting same error. What did i missed?: /* [Sanasol] Current WoE Statistics */ //read WoE Statistics if (SQL_ERROR == SqlStmt_Prepare(stmt, "SELECT `top_damage`, `damage_done`, `damage_received`, `emperium_damage`," "`guardian_damage`, `barricade_damage`, `gstone_damage`, `emperium_kill`, `guardian_kill`," "`barricade_kill`, `gstone_kill`, `sp_heal_potions`, `hp_heal_potions`, `yellow_gemstones`," "`red_gemstones`, `blue_gemstones`, `poison_bottles`, `acid_demostration`, `acid_demostration_fail`," "`support_skills_used`, `healing_done`, `wrong_support_skills_used`, `wrong_healing_done`, `sp_used`," "`zeny_used`, `spiritb_used`, `ammo_used`, `kill_count`, `death_count`, `score`" " FROM `char_woe_statistics` WHERE `char_id` = ? AND `date`=CURRENT_DATE()") || SQL_ERROR == SQL->StmtBindParam(stmt, 0, SQLDT_INT, &char_id, sizeof char_id) || SQL_ERROR == SQL->StmtExecute(stmt) || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_UINT, &p->woe_statistics.top_damage, sizeof p->woe_statistics.top_damage, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_UINT, &p->woe_statistics.damage_done, sizeof p->woe_statistics.damage_done, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_UINT, &p->woe_statistics.damage_received, sizeof p->woe_statistics.damage_received, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_UINT, &p->woe_statistics.emperium_damage, sizeof p->woe_statistics.emperium_damage, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_UINT, &p->woe_statistics.guardian_damage, sizeof p->woe_statistics.guardian_damage, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_UINT, &p->woe_statistics.barricade_damage, sizeof p->woe_statistics.barricade_damage, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_UINT, &p->woe_statistics.gstone_damage, sizeof p->woe_statistics.gstone_damage, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_INT, &p->woe_statistics.emperium_kill, sizeof p->woe_statistics.emperium_kill, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 8, SQLDT_INT, &p->woe_statistics.guardian_kill, sizeof p->woe_statistics.guardian_kill, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 9, SQLDT_INT, &p->woe_statistics.barricade_kill, sizeof p->woe_statistics.barricade_kill, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 10, SQLDT_INT, &p->woe_statistics.gstone_kill, sizeof p->woe_statistics.gstone_kill, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 11, SQLDT_UINT, &p->woe_statistics.sp_heal_potions, sizeof p->woe_statistics.sp_heal_potions, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 12, SQLDT_UINT, &p->woe_statistics.hp_heal_potions, sizeof p->woe_statistics.hp_heal_potions, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 13, SQLDT_UINT, &p->woe_statistics.yellow_gemstones, sizeof p->woe_statistics.yellow_gemstones, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 14, SQLDT_UINT, &p->woe_statistics.red_gemstones, sizeof p->woe_statistics.red_gemstones, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 15, SQLDT_UINT, &p->woe_statistics.blue_gemstones, sizeof p->woe_statistics.blue_gemstones, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 16, SQLDT_UINT, &p->woe_statistics.poison_bottles, sizeof p->woe_statistics.poison_bottles, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 17, SQLDT_UINT, &p->woe_statistics.acid_demostration, sizeof p->woe_statistics.acid_demostration, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 18, SQLDT_UINT, &p->woe_statistics.acid_demostration_fail, sizeof p->woe_statistics.acid_demostration_fail, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 19, SQLDT_UINT, &p->woe_statistics.support_skills_used, sizeof p->woe_statistics.support_skills_used, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 20, SQLDT_UINT, &p->woe_statistics.healing_done, sizeof p->woe_statistics.healing_done, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 21, SQLDT_UINT, &p->woe_statistics.wrong_support_skills_used, sizeof p->woe_statistics.wrong_support_skills_used, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 22, SQLDT_UINT, &p->woe_statistics.wrong_healing_done, sizeof p->woe_statistics.wrong_healing_done, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 23, SQLDT_UINT, &p->woe_statistics.sp_used, sizeof p->woe_statistics.sp_used, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 24, SQLDT_UINT, &p->woe_statistics.zeny_used, sizeof p->woe_statistics.zeny_used, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 25, SQLDT_UINT, &p->woe_statistics.spiritb_used, sizeof p->woe_statistics.spiritb_used, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 26, SQLDT_UINT, &p->woe_statistics.ammo_used, sizeof p->woe_statistics.ammo_used, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 27, SQLDT_INT, &p->woe_statistics.kill_count, sizeof p->woe_statistics.kill_count, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 28, SQLDT_INT, &p->woe_statistics.death_count, sizeof p->woe_statistics.death_count, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 29, SQLDT_INT, &p->woe_statistics.score, sizeof p->woe_statistics.score, NULL, NULL) || SQL_SUCCESS != SQL->StmtNextRow(stmt)) { p->woe_statistics.score = 2000; } strcat(t_msg, " woestats"); /* [Sanasol] Current WoE Statistics */