SA-MP Forums Archive
[Solved] Calculating problem. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Solved] Calculating problem. (/showthread.php?tid=398868)



[Solved] Calculating problem. - CoaPsyFactor - 11.12.2012

Код:
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);