I am making a poker card detector and i made this function, tell me if i need to post the whole script.
SCAR Code:
function card(blacknum, bxnum, bynum, slot: integer): boolean;
begin
result := false;
if slot = 1 then
begin
flopx1 := 276;
flopy1 := 181;
flopx2 := 324;
flopy2 := 247;
if FindDTM(blacknum, bx3, by3, flopx1, flopy1, flopx2, flopy2) then // <= line 46
begin
fbs1 := true;
result := true;
end;
end;
if slot = 2 then
begin
flopx1 := 330;
flopy1 := 182;
flopx2 := 378;
flopy2 := 246;
if FindDTM(blacknum, bx3, by3, flopx1, flopy1, flopx2, flopy2) then
begin
fbs2 := true;
result := true;
end;
end;
if slot = 3 then
begin
flopx1 := 382;
flopy1 := 181;
flopx2 := 434;
flopy2 := 246;
if FindDTM(blacknum, bx3, by3, flopx1, flopy1, flopx2, flopy2) then
begin
fbs3 := true;
result := true;
end;
end;
if slot = 4 then
begin
flopx1 := 437;
flopy1 := 181;
flopx2 := 488;
flopy2 := 248;
if FindDTM(blacknum, bx3, by3, flopx1, flopy1, flopx2, flopy2) then
begin
fbs4 := true;
result := true;
end;
end;
if slot = 5 then
begin
flopx1 := 491;
flopy1 := 182;
flopx2 := 541;
flopy2 := 247;
if FindDTM(blacknum, bx3, by3, flopx1, flopy1, flopx2, flopy2) then
begin
fbs5 := true;
result := true;
end;
end;
end;
the error : [Runtime Error] : Exception: Access violation at address 006D691C in module 'scar.exe'. Read of address 000001C4 in line 46 in script C:\Program Files (x86)\SCAR 3.15\Scripts\pokerstars cheat.scar