View Single Post
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-31-2012 , 00:11   Re: overkill, losing negative points?
Reply With Quote #4

Quote:
Originally Posted by HLM View Post
PHP Code:
new healthloss =((g_bhealth[victimid]*10) / (25)) 
why would this math operation return a value of -1? what does it mean and how do I fix it?

edit: I know why, but I want to know how to fix the numbers from going whatever the integer limit may be (2147483647 ?)
Explain why (since you know). And . . . what? If you are going over the limit then you need to rethink your algorithms.

Also, do you realize that that type of division is not the "normal" type of division? It's called integer division:

E.g.
25/4 = 6
124/25 = 4
etc.
__________________
fysiks is offline