Quote:
Originally Posted by HLM
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.
__________________