Assistance with calculations, not sure why not working.
#1

pawn Код:
InfPrice(oldprice)
{
    printf("oldmoney %d", oldprice);
    if(TotalServerMoney < 7000000) return oldprice;
    new newprice, money, calc;
    printf("oldmoney %d", oldprice);
    money = (TotalServerMoney - ServerStartMoney) / ServerStartMoney; //7,000,000
    printf("ServerStartTotal %d",ServerStartMoney);
        printf("TotalServerMoneyl %d",TotalServerMoney);
    InflatPercentage = money * 100;
   
    calc = oldprice * InflatPercentage;
   
    newprice = oldprice + calc;
    printf("newmoney %d", newprice);
    return newprice;
}
pawn Код:
new Float: InflatPercentage;
The printf's show the correct inputs (oldprice, totalserver, serverstart) but won't calculate them properly, could anyone advise why?

Thanks.
Reply


Messages In This Thread
Assistance with calculations, not sure why not working. - by Dokins - 26.02.2015, 18:53
Re: Assistance with calculations, not sure why not working. - by Vince - 26.02.2015, 18:58
Re: Assistance with calculations, not sure why not working. - by Dokins - 26.02.2015, 19:02

Forum Jump:


Users browsing this thread: 1 Guest(s)