dezkit Posted May 22, 2010 Share Posted May 22, 2010 Hey guys I got this code: function SteamToCommunity( $SteamId ) { $Parts = Explode( ':', Str_Replace( 'STEAM_', '', $SteamId ) ); return BcAdd( BcAdd( '76561197960265728', $Parts[ '1' ] ), BcMul( $Parts[ '2' ], '2' ) ); } Whenever I try to use this function it always brings up trailing 0's after the interger, such as "76561197961308838.0000000000" I only need 76561197961308838, my friend who has the same exact script, it doesn't do the trailing zero's, any help? thanks. Link to comment https://forums.phpfreaks.com/topic/202604-need-help-with-a-function/ Share on other sites More sharing options...
JAY6390 Posted May 22, 2010 Share Posted May 22, 2010 return preg_replace('/\..*$/', '',BcAdd( BcAdd( '76561197960265728', $Parts[ '1' ] ), BcMul( $Parts[ '2' ], '2' ) )); Change the return line to that and see if it fixes it Link to comment https://forums.phpfreaks.com/topic/202604-need-help-with-a-function/#findComment-1062042 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.