View Single Post
miniman
Senior Member
Join Date: Aug 2009
Location: Israel
Old 08-31-2010 , 07:10   Re: Dividing the numbers in sourcemod
Reply With Quote #3

Quote:
Originally Posted by Touch View Post
Hello
I need to calculate the ratio player.
But there are problems with the script.
If I did not kill anybody or himself is not dead, then the script in console an error.
But if, as I had killed himself died a few times, then my ratio = 0.00000.

PHP Code:
new userkills GetClientFrags(client);
new 
userdeaths GetClientDeaths(client);
new 
Float:ratio;
ratio userkills userdeaths
Why is my ratio 0.0000?

Thx!
PHP Code:
new Float:userkills=float(GetClientFrags(client));
new 
Float:userdeaths float(GetClientDeaths(client));
new 
Float:ratio;
ratio userkills userdeaths
oh someone posted before me ^
miniman is offline