Float value problem.
#8

Quote:
Originally Posted by Norck
Посмотреть сообщение
Believe me, i have a code, which is doesn't work properly because of this inaccuracy. Otherwise i'd not have started this topic

Just another example:
pawn Код:
// SomeStats[playerid] = 40.0
new str[32];
format(str,sizeof(str),"Your xxx is %.1f !",SomeStats[playerid]);   // "Your xxx is 40.0 !"
SendClientMessage(playerid,COLOR_WHITE,str);

//....

//Now SomeStats[playerid] = 40.1
new str[32];
format(str,sizeof(str),"Your xxx is %.1f !",SomeStats[playerid]);   // It will still show "Your xxx is 40.0 !"
SendClientMessage(playerid,COLOR_WHITE,str);
AFAIK there's nothing we can do about it not being SUPER precise (im sure there's a reason...i dont think its just a "derp", that would be a big fail). If you post the code that doesnt work due to this inaccuracies THEN we can do something (and i mean physically doesnt work, not printing a value that is slightly off).

Other than that, your kind of screwed unless someone else in this community has an answer and fix for you. Either way, i wish you luck and hope you get an answer!
Reply


Messages In This Thread
Float value problem. - by Norck - 18.03.2011, 15:49
Re: Float value problem. - by Sascha - 18.03.2011, 15:59
Re: Float value problem. - by Norck - 18.03.2011, 16:14
Re: Float value problem. - by Kyosaur - 18.03.2011, 16:19
Re: Float value problem. - by Norck - 18.03.2011, 16:37
Re: Float value problem. - by Kyosaur - 18.03.2011, 16:49
Re: Float value problem. - by Norck - 18.03.2011, 17:01
Re: Float value problem. - by Kyosaur - 18.03.2011, 17:05
Re: Float value problem. - by Norck - 18.03.2011, 17:15
Re: Float value problem. - by Norck - 18.03.2011, 20:52

Forum Jump:


Users browsing this thread: 1 Guest(s)