Converting Float to String - 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: Converting Float to String (
/showthread.php?tid=192682)
Converting Float to String -
Flibber100 - 23.11.2010
Hi guys.
I was just wondering how to convert a simple Float to a string.
Yeah, I know floatstr is for string to float, but what about the reverse-way?
I need it for fwrite() =/
Re: Converting Float to String -
Zh3r0 - 23.11.2010
Simple as that.
pawn Code:
new string[ 30 ];
format( string, 30, "%f", Variable);
Re: Converting Float to String -
Flibber100 - 23.11.2010
Oh damn, i didn't consider that one...
Thanks guys!