Percentage issues ?
#1

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 ?

pawn Код:
stock TestSell(pricee)
{
  printf(" **** %d", ((SALING_LOSE_PERCENTAGE/100)*pricee)); //SALING_LOSE_PERCENTAGE = 50 and pricee = 100
  return 1;
}
Reply


Messages In This Thread
Percentage issues ? - by Kyosaur - 10.01.2010, 20:54
Re: Percentage issues ? - by dice7 - 10.01.2010, 21:09
Re: Percentage issues ? - by Puffmac - 10.01.2010, 21:14
Re: Percentage issues ? - by Kyosaur - 10.01.2010, 21:18
Re: Percentage issues ? - by Finn - 10.01.2010, 21:22
Re: Percentage issues ? - by Kyosaur - 10.01.2010, 21:24
Re: Percentage issues ? - by iLinx - 11.01.2010, 00:10

Forum Jump:


Users browsing this thread: 1 Guest(s)