New Thread. Warning report
Quote:
Quote:
|
Re: New Thread. Warning report
It seems that everything has an integer value, but calc variable is a float.
|
Re: New Thread. Warning report
Quote:
|
Re: New Thread. Warning report
new Float:calc = (Float:g_playerFlags[id] + i_offset) / LEVEL_INCREMENT
this should do it. Remeber, one value in your calculation has to be a floating number |
Re: New Thread. Warning report
You can make one of these variables Float:, use float() native or add * 1.0.
|
Re: New Thread. Warning report
wouldn't the method I posted work as well?
|
Re: New Thread. Warning report
Quote:
|
Re: New Thread. Warning report
Quote:
Quote:
The Float:calc is fine. Reason: when you use a division operator it automatically requires your varible you're storing it to to be a float. Otherwise it will give an error or warning or whatever. I don't remember which.... new Float:i = 1 / 2 its accepted because you MUST be a float in order to have division within its calculations. |
Re: New Thread. Warning report
Your problem was the Tag mismatch. When you have a Float variable and you equal it to something like
Float: myvar = (a + b) / c one of these (a, b or c) has to be a float in order to not have a tagmismatch. AFAIK from C++, when one variable is a float the whole term is converted into a float => no mismatch |
Re: New Thread. Warning report
Quote:
|
| All times are GMT -4. The time now is 00:29. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.