how?: if a float=0.0 ..then set float=1.0
hi
how can i force "floatX" to be 1.0 ..if has a value of 0.0? this does not work: PHP Code:
|
Re: how?: if a float=0.0 ..then set float=1.0
= means set
== means "is equal to" |
Re: how?: if a float=0.0 ..then set float=1.0
PHP Code:
|
Re: how?: if a float=0.0 ..then set float=1.0
actually that can be considered as a typo.
i do have : PHP Code:
|
Re: how?: if a float=0.0 ..then set float=1.0
Floats are not like integers. Results of formulas rarely equal 0.0, so use something like this:
PHP Code:
|
Re: how?: if a float=0.0 ..then set float=1.0
thx..
well if g_AlivePlayers = 0 ..then the outcome of the formula is 0 will your method work then? 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? here i need two if conditions to achieve my goal: PHP Code:
|
Re: how?: if a float=0.0 ..then set float=1.0
Quote:
Quote:
Code:
new Float:variableQuote:
|
Re: how?: if a float=0.0 ..then set float=1.0
Quote:
Quote:
PHP Code:
|
Re: how?: if a float=0.0 ..then set float=1.0
Code:
variableX = floatclamp( MAXm/400.0, 15.0, 30.0 ) |
| All times are GMT -4. The time now is 14:51. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.