[Solved] Calculating problem. -
Код:
Hi there,
I have this little problem, you can see in code what is script supposed to do.
pawn Код:
stock BusinessGiveMoney(businessid, money){ if(businessid == 1) return BusinessInfos[businessid][bAccount] += money; new Percentage = floatround((money / 100) * Taxes); BusinessInfos[businessid][bAccount] += (money - Percentage); BusinessInfos[1][bAccount] += Percentage; return true;}
But from some reason Percentage is 0 always, I've tried to printf that and when I try to calculate (money / 100) * Taxes it returns 0 for float and for int.
BusinessGiveMoney(3, 40);