SA-MP Forums Archive
Help with float and floatround - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with float and floatround (/showthread.php?tid=92267)



Help with float and floatround - Henry11200 - 19.08.2009

So i have this function:

Код:
public UpdateAk()
{
for(new i=0; i<MAX_AKT; i++)
{
new hnd = Aktsia[i][Ind];
new Float:uhnd;
new hhnd;
new ear = Aktsia[i][Ar];
new osa = Ak[i][Os];
new vosa = Ak[i][VOs];
new ovahe = osa - vosa;
uhnd = hnd - (((ear/hnd)/10000) * ovahe);
hhnd = floatround(uhnd,floatround_round);
Akt[i][Ind] = hhnd;
Ak[i][VOs] = osa;
}
SaveAk();
}
and the problem seems to be in uhnd and hhnd. But i cant figure out what.