Code:
PHP Code:
float Ammo, Clip;
// .... some other operations here
int AmmoInt = RoundToCeil(Ammo);
int ClipInt = RoundToCeil(Clip);
PrintToChatAll("Ammo: %d %d, Clip: %d %d", Ammo, AmmoInt, Clip, ClipInt);
The printout in-game:
Code:
Ammo: 24 0, Clip: 16 0
The 24 and 16 are correct but they are floating point numbers in the code. I want them to be integers. Why is RoundToCeil returning 0?