Jump to content

  •  

Photo

Fail with custom Logs


  • Please log in to reply
No replies to this topic

#1 Triedge

Triedge

    Advanced Member

  • Members
  • PipPipPip
  • 191 posts

Posted 18 May 2016 - 02:21 AM

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.

Attached File  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.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users


This topic has been visited by 19 user(s)