rogeruk
2007-09-02 10:53:23
Im using this code that was posted in the snippets section..
Currently im using it as
I get the error
Line 149 is..
Any ideas please?
function CountItemDTMA(DTM: Integer): Integer;//Based off of the
var //one in srl for bmps
i, x, y: Integer;
TB: Tbox;
begin
if not LoggedIn then Exit;
GameTab(4);
for i := 1 to 28 do
begin
TB := InvBox(i);
if ExistsItem(i) then
if FindDTM(DTM, x, y, TB.x1, TB.y1, TB.x2, TB.y2) then
Inc(Result);
end;
end;Currently im using it as
oaklogdtm := DTMFromString('78DA63CC65626078CA80028AC24D187418191' +
'88088E13F10302601D5DC6540038C4824902E03AAB945404D3250' +
'CD5B026AAA806A5EE1570300B1680BD4');
aoaklogs:=CountItemDTMA(oaklogdtm);I get the error
[Runtime Error] : Exception: Access violation at address 006FFBEA in module 'scar.exe'. Read of address 00000000 in line 149 in script C:\Program Files\SCAR 3.11\Scripts\OakBanker2.5.scar
Line 149 is..
if FindDTM(DTM, x, y, TB.x1, TB.y1, TB.x2, TB.y2) thenAny ideas please?