SA-MP Forums Archive
removing decimal - 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: removing decimal (/showthread.php?tid=205784)



removing decimal - armyoftwo - 02.01.2011

for example i have
Код:
new Float:RobSkill = 1.4;
format(String, sizeof(String), "%0.1f", RobSkill);
That will print 1.4, how can i that it prints 1?


Re: removing decimal - Joe Staff - 02.01.2011

"%.0f" would print a rounded down version of a float


Re: removing decimal - Jochemd - 02.01.2011

Wiki:floatround