.to_i
Put this at the end of your calculations in the script.
edit: Or rather, in the damage calculations.
You misunderstood - it needs to be applied to the number or variable that has the decimals.
The decimals are showing because that number got converted to float at some time, and it needs to be converted back to integer to solve the problem.
So you need to write
b.hp.to_i; b.mp.to_iat the end of that damage formula, because the calculation with the 1.5 or 0.75 turns both those values into floats with decimals.
Where did it get converted to a float? Find the REAL cause of the problem and fix it, rather than applying bandaids to cover things up.
Did you make a script change? Did you add a new script method for a damage formula? Did you have a damage formula that converts something to a float? THERE is where you need to convert it to an integer.
I have made a few minor script edits (such as removing the Item command in combat), but nothing that should mess with the way numbers show up. I have 3 scripts related to combat, one to show enemy HP/MP bars, one that removes the Fight/Escape part at the start of a battle, and the third only activates if a character is inflicted with a condition and is unrelated to the skill I'm using here.
I already had those in much earlier, and it's never shown me decimals before. For example, a skill that I have that heals for 20%HP, is still getting rounded up/down automatically, not showing decimals.
The key is that you need to find the places where you used decimals. Only those will cause the error, because those will convert the data to convert to float
a=HP/5; // no decimal, will not cause errorsa=HP*0.2; // contains decimals, will cause the value of a to become floata=HP/5.0; // contains decimals, will cause the value of a to become floatThe results of all three formulae are the same, but only the first will keep the values without decimals.
And as soon as any one value has become float, it will convert all other values it is used together with