View Single Post
Author Message
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 09-19-2015 , 00:12   RoundTo... returning 0
Reply With Quote #1

Code:

PHP Code:
    float AmmoClip;

// .... some other operations here

    
int AmmoInt RoundToCeil(Ammo);
    
int ClipInt RoundToCeil(Clip);
    
    
PrintToChatAll("Ammo: %d %d, Clip: %d %d"AmmoAmmoIntClipClipInt); 
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?
Potato Uno is offline