Quote:
Originally Posted by cs1.7
thx..
well if g_AlivePlayers = 0 ..then the outcome of the formula is 0
|
Dividing by zero will result in an error.
Quote:
Originally Posted by cs1.7
edit:
another question:
if variable is >30.0 --> set it to 30.0
if it is <15.0 -->set it to 15.0
how do i create such a code most efficiently? Can i create this via one if sentence?
|
Code:
new Float:variable
variable = floatclamp(variable, 15.0, 30.0)
Quote:
Originally Posted by cs1.7
here i need two if conditions to achieve my goal:
PHP Code:
if(variableX > 30.0)
{
variableX = 30.0;
}
else
{
variableX = MAXm / 400.0;
}
if(variableX < 15.0)
{
variableX = 15.0;
}
else
{
variableX = MAXm / 400.0;
}
|
I don't understand this code.
__________________