Math in a variable
#1

Hello,

I'm working on a simple calculation. But I cannot get it work in a variable.
I tried the following methods. All the time I will get an argument mismatch error/warning if I use the variable at 'GivePlayerMoney'.

pawn Код:
new Calculation = COwnerData[i][Price] * 0.85;
I also tried braces.

pawn Код:
new Float:Calculation = COwnerData[i][Price] * 0.85;
I also tried format, didn't work out.
Reply
#2

pawn Код:
new
    Calculation = floatround( floatmul( COwnerData[i][Price], 0.85 ), floatround_ceil );
;
Untested.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)