I'm as some of you know working on a GE Merchanter and this is my GetAdvice function:
SCAR Code:
procedure GetAdvice;
var
Max, i, Item: Integer;
Per: Extended;
INI, Write: String;
A: TAuc;
begin
Max := ItemsInDB;
Writeln('We suggest you buy these items:');
for i := 0 to Max do
begin
INI := ReadINI('Items', IntToStr(i), Path);
ConvertINI(INI, A.Name, A.Min, A.Mark, A.Max, A.ID);
Per := (A.Mark - A.Min) / (A.Max - A.Min) * 100.0;
if (Per < Percenter) then
begin
Inc(Item);
Write := 'Item: ' + A.Name + ' is at ' + IntToStr(A.Mark) + ' gp ( ' + FloatToStr(Per) + '% of max) and has ' +
'been seen at a max of ' + IntToStr(A.Max);
Writeln(Write);
end;
end;
end;
However, this always outputs 0: Per := (A.Mark - A.Min) / (A.Max - A.Min) * 100.0;
A.Mark, A.Min and A.Max all holds a number so I can't figure out why it outputs a zero.
Any help will be appreciated