Integer / Float issue
#4

Something might be up with Pawn's implicit float/int conversion (operator +=). Try doing it explicitly using the float() function... try changing,

pawn Код:
Total_Cost_LV += EvaluateHouse(houseid);
to

pawn Код:
Total_Cost_LV += float(EvaluateHouse(houseid));
This should fix your first printf statement if the implicit conversion is a problem. If this fixes it for the first print statement then you'll also need to edit similar statements to be of the same form.

edit:

Change it for all of your Total_Cost_* = EvaluateHouse(houseid) (in CalculateMillLevy) assignments before testing.
Reply


Messages In This Thread
Integer / Float issue - by Kar - 28.10.2012, 16:32
Re: Integer / Float issue - by Kar - 29.10.2012, 23:42
Re: Integer / Float issue - by Kar - 30.10.2012, 02:14
Re: Integer / Float issue - by Simon - 30.10.2012, 04:00

Forum Jump:


Users browsing this thread: 1 Guest(s)