31.07.2011, 20:17
Okay, well I can't explain this very good but sometimes the * and / operator's either return very OFF values or negative values, using the raw floatmul and floatdiv fixes it
Example, when someone sells a house in my server that has over 20m or around that price it gives them negative values, this is how the sale price is calculated
Yet, it gave then -x instead of x.
doing this
did the trick s:
I don't know if it's suppose to be like that but... if so just remove the topic please
Example, when someone sells a house in my server that has over 20m or around that price it gives them negative values, this is how the sale price is calculated
pawn Код:
SafeGivePlayerMoney(playerid, HouseInfo[i][Price] * 87/100);
doing this
pawn Код:
SafeGivePlayerMoney(playerid, floatround(floatdiv(floatmul(HouseInfo[i][Price], 87), 100)));
I don't know if it's suppose to be like that but... if so just remove the topic please