float retuns nothing...
#1

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?
Reply
#2

bump
Reply
#3

format(TestString, sizeof(TestString), "Starter: %f Doll: %i Cent: %i", Doll, Cent);

%f %i %i - Doll, Cent --> 3 variable slots, 2 variables
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)