EDIT:FIXED
Im making a "simple" power miner for someone. I keep comming across this error. In the while do loop I set up, im making it wait until the inventory count changes, but it only performs the procedures in the loop and then breaks out, EVERY SINGLE TIME! Even if the inventory count hasnt changed. I cant seem to find out what the problem is and its really fustrating. I will now post the while do procedure, and if you were curious about my fighting function, I posted that also.
SCAR Code:
function FindTheFight: boolean;
begin
if (FindFight) then
begin
result := true;
RunAwayDirection('N');
RunBack;
end else
result := false;
end;
procedure Mwait;
var
Maxmm, sic, esc, gx, gy: integer;
begin
GetMousePos(gx, gy);
MarkTime(maxmm);
sic := InventoryCount;
esc := sic;
while (sic = esc) do
begin
esc := InventoryCount;
case random(10) + 1 of
2: MouseBox(msx1, msy1, msx2, msy2, 3);
8: MouseBox(mix1, miy1, mix2, msy2, 3);
end;
if not(FindPick) or (GasColors(gx, gy)) or (FindNormalRandoms) or
(FindTheFight) or (TimeFromMark(Maxmm) >= 20000) then
break;
end;
Wait(300 + Random(500));
end;