Formula Issue
#2

I expect that REFUEL_COST is for 100%, isnt it ?

Than its an easy cross-multiplication
Код:
100% fuel = REFULE_COST
fuelamount = calculation
pawn Код:
new calculation = (fuelamount * REFULE_COST) / 100;
Also I noticed that you create variables before you need it
pawn Код:
//
    new neededfuel = /* */; // not needed here
    if() { } else {
        if() {
            new calculation = /* */; // not needed here
            // neededfuel first time used
            if() { } else {
                // calculation first time used
                if() { } else {
                }
            }
        }
    }
Reply


Messages In This Thread
Formula Issue - by nmader - 08.09.2012, 16:58
AW: Formula Issue - by Nero_3D - 08.09.2012, 17:31
Re: Formula Issue - by nmader - 08.09.2012, 17:57
AW: Formula Issue - by Nero_3D - 08.09.2012, 17:59
Re: Formula Issue - by nmader - 08.09.2012, 18:03
AW: Formula Issue - by Nero_3D - 08.09.2012, 20:02
Re: Formula Issue - by SuperViper - 08.09.2012, 20:04

Forum Jump:


Users browsing this thread: 1 Guest(s)