Working on a log damage, but a strange error when saving a data within the database.
void log_damage_skills(int char_id, const char *char_name, int class, int char_lvl,int batk,int watk, int mob_id, const char *mob_name, int mob_lvl, int skill_id, int skill_lv, struct Damage damagd, int porcentual) { ShowDebug("Iniciando logsamage \n"); ShowDebug("(per = '%d') \n", porcentual); int finalper = porcentual; char *Final = "finalmente"; if (SQL_ERROR == SQL->Query(logs->mysql_handle, LOG_QUERY " INTO `control_skill_damage` ( `date`, `char_id`, `char_name`, `class`, `char_lvl`, `char_batk`, `char_watk`, `mob_id`, `mob_name`, `mob_lvl`, `skill_id`, `skill_lv`, `damage`, `porcentual`, `notas`) VALUES (NOW(), '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', 'Finalmente')", char_id, char_name, class, char_lvl, batk, watk, mob_id, mob_name, mob_lvl, skill_id, skill_lv, damagd, porcentual) ) { Sql_ShowDebug(logs->mysql_handle); return; } }
The problem is the value "porcentual"
Always keep a value of 0.
Screenshot_105.png 10.17K 3 downloads
Just I do not understand why always returning the value.
In fact, in the console it is that the value is 50, 400, etc ...
But when saving, always keeps 0.