Format removing decimals
#1

This is probably pretty simple, but I'm unable to figure it out. Saving coordinates to an ini file, this seems to remove the decimal from each float, C1X, C1Y, C1Z.. How would I save it as a float?

Код:
format(var, 64, "C1X=%d\n",C1X[playerid]);fwrite(hFile, var);
format(var, 64, "C1Y=%d\n",C1Y[playerid]);fwrite(hFile, var);
format(var, 64, "C1Z=%d\n",C1Z[playerid]);fwrite(hFile, var);
Reply
#2

Change the :
PHP код:
%
with :
PHP код:
%
PHP код:
%// = decimal 
%//  = float 
%// = string 
Reply
#3

Quote:
Originally Posted by Jabern
Посмотреть сообщение
Change the :
PHP код:
%
with :
PHP код:
%
PHP код:
%// = decimal 
%//  = float 
%// = string 
Wow, very simple.. lol Thank you!
Reply
#4

https://sampwiki.blast.hk/wiki/Format
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)