10.01.2010, 20:54
There seems to be some problems when ever i try to subtract a certain percentage from a number, is anyone else having this problem? I made this small function just to test, but it doesn't seem to be working, it always prints 0 for some reason. I know the math is right, but pawn just wont do it correctly for some strange reason (is it due to SALING_LOSE_PERCENT/100 equaling a float value ?). Im just completely out of ideas.
Help pl0x ?
Help pl0x ?
pawn Код:
stock TestSell(pricee)
{
printf(" **** %d", ((SALING_LOSE_PERCENTAGE/100)*pricee)); //SALING_LOSE_PERCENTAGE = 50 and pricee = 100
return 1;
}