float retuns nothing... - 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)
+--- Thread: float retuns nothing... (
/showthread.php?tid=437191)
float retuns nothing... -
Terminator1 - 14.05.2013
the code
pawn Code:
new Float:Money2 = 12.34,
Doll = floatround(Money, floatround_floor),
Cent = floatround(floatfract(Money2)*100);
//Remove Once Finished.
new TestString[150];
format(TestString, sizeof(TestString), "Starter: %f Doll: %i Cent: %i", Doll, Cent);
what TestString returns
Quote:
Starter: 0.00000 Doll: 84 Cent:
|
what it should return
Quote:
Starter: 84.23000 Doll: 84 Cent:34
|
it should return 34 dollors not 23 as i made a money 2 variable to test why but it still does it
can anyone help?
Re: float retuns nothing... -
Terminator1 - 14.05.2013
bump
AW: float retuns nothing... -
HurtLocker - 14.05.2013
format(TestString, sizeof(TestString), "Starter: %f Doll: %i Cent: %i", Doll, Cent);
%f %i %i - Doll, Cent --> 3 variable slots, 2 variables