multiply an int with float[problem]
#1

Hi, every time i try to multiply a number by a float, i get big numbers, fox example new Float:floatvar=2.5; 1000*varforfloat. How can i fix this?
Reply
#2

Convert the integer into a float.
Reply
#3

Doesn't help.
Reply
#4

pawn Код:
printf("%d x %.3f = %.3f", integer, float, integer*float);
Reply
#5

Yeah it works, but i need to use this code in GivePlayerMoney, and how about now? i can't use "%f"
Reply
#6

Use
pawn Код:
GivePlayerMoney(playerid, floatround(int*float));
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)