can someone tell me why
Simba Code:
program new;
{$i SRL/SRL.scar}
{$i SRL/SRL/Misc/Stats.scar}
{$i SRL/SRL/Misc/Users.scar}
{$i SRL/SRL/Misc/Reports.scar}
{$i SRL/SRL/Misc/Debug.scar}
function Get_Black_Count(Slot, Color: Integer; Bank: Boolean): Integer;
var
b: TBox;
begin
Result := 0;
if Bank then
b := BankIndexToMSBox(Slot)
else
b := InvBox(Slot);
Result := CountColor(Color, b.X1, b.Y1 + 15, b.X2, b.Y2);
end;
function Count_Items(Count, Start_Slot, Finish_Slot: Integer; out Slots: array of Integer): Integer;
var
i: Integer;
begin
SetLength(Slots, 50);
Result := 0;
for i := Start_Slot to Finish_Slot do
if(Get_Black_Count(i, SRL_OUTLINE_BLACK, true) = Count) then
begin
Inc(Result);
Slots[Result - 1] := i;
end;
SetLength(Slots, Result);
end;
procedure OutputArray(const Arr: TIntegerArray; Write: string);
var
I, ArrLength: Integer;
S: string;
begin
ArrLength := High(Arr);
S := ' ' + Write + ' := [';
for I := 0 to ArrLength do
S := S + IntToStr(Arr[I]) + ', ';
Delete(S, Length(S) - 1, Length(S));
S := S + '];';
Writeln(S);
end;
var
i, Item_Amount, ColourCount :integer;
SlotsIn: array of Integer;
begin
setupSRL;
ActivateClient;
wait(1000);
ColourCount := Get_Black_Count(1, srl_outline_black, False); // tried with SRL's constant. and 131072 all are 35
writeln('Colour Count is '+inttostr(ColourCount));
for i := 1 to 12 do
begin
writeln(inttostr(Get_Black_Count(i, srl_outline_black, false)));
end;
Item_Amount := Count_Items(35,1,12,SLOTSIN);
OutputArray(SlotsIn, 'COUNT ITEMS:')
writeln('Item Amount is '+inttostr(Item_Amount));
end.
outputs
Code:
Compiled succesfully in 1825 ms.
SRL Compiled in 16 msec
Colour Count is 35
35
39
35
39
35
35
35
39
35
35
35
39
COUNT ITEMS: :=];
Item Amount is 0
Successfully executed.
when the inventory is

when item amount should equal 8 and slots in should be 1, 3, 5, 6, 7, 9, 10, 11
i really have no idea why, its already in safe mode and i have tried with SMART