I have a text message for the player to tell them that they have received a small reward. The amount of that reward is obtained by dividing a number. That, obviously, doesn't always result in an integer and so the text will say e.g. You have received a bonus of 13.5 EXP. That is also the amount shown in the Status menu. I think this looks ridiculous.
I have tried using Mod instead of Div but that gave double the amount it should. (I fried my little brain trying to work out how the heck that could happen. I thought the risk of using it would be that it only rounded down, not that it would, in a fit of generosity, hand out twice the amount). What I would like to do is for the variable to round up/down when the result is shown in the text box.
Could anyone tell me how I might do this.
Thank you.
I have tried using Mod instead of Div but that gave double the amount it should. (I fried my little brain trying to work out how the heck that could happen. I thought the risk of using it would be that it only rounded down, not that it would, in a fit of generosity, hand out twice the amount). What I would like to do is for the variable to round up/down when the result is shown in the text box.
Could anyone tell me how I might do this.
Thank you.