Results 1 to 8 of 8

Thread: Stupid FindBitMapToleranceIn !!

  1. #1
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Stupid FindBitMapToleranceIn !!

    Oke, I just found out that EVERYWHERE I use FindBitmapToleranceIn, i get this error:

    [Runtime Error] : Exception: Access violation at address 00650C79 in module 'scar.exe'. Read of address 00000030 in line **** in script ***

    What can i do?

    EDIT: I released my script here!!
    Srl simply rocks.

  2. #2
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Please show the line of code so we can help you further.

  3. #3
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I now have FindDeformedBitmapTolerance in, and this is where i get the error:

    Not really =/

    function FindDeformedMM(var TX, TY: Integer; BMP: integer): Boolean; //By Nielsie95
    begin
    Ref := 0.9;
    Tol := 20;
    for Times := 1 to 50 do
    begin
    FindDeformedBitmapToleranceIn(MMRock, XT, YT, MMX1, MMY1, MMX2, MMY2, Tol, 10, True, Acc); --- Right here
    if (Acc >= Ref) then
    begin
    TX := XT;
    TY := YT;
    Result := True;
    Exit;
    end;
    if Times mod 5 = 0 then
    begin
    Ref := Ref - 0.05;
    Tol := Tol + 5;
    end;
    Wait(20 + Random(20));
    end;
    end;
    Error:

    [Runtime Error] : Exception: Access violation at address 00650D9B in module 'scar.exe'. Read of address 00000034 in line 1194 in script ...
    Srl simply rocks.

  4. #4
    Join Date
    Dec 2006
    Location
    Australia
    Posts
    698
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    maybe it has something to do with if (Acc >= Ref) then, i dont see you increment or decrement either of the two so i assume they must automatically set.

  5. #5
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Acc get set automatticaly by the procedure FindDeformedBitmapToleranceIn, Ref do i need to set manually.
    Nielsie95, its your function, can you help?
    Srl simply rocks.

  6. #6
    Join Date
    Dec 2006
    Location
    Australia
    Posts
    698
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    here is his function, notice how he declares the acc as a variable. Would it make any difference if you did?

    SCAR Code:
    function FindDeformedMM(var TX, TY: Integer; BMP: integer): Boolean; //By Nielsie95
    var ref, acc: extended; Tol, Times, XT, YT: integer;
    begin
      Ref := 0.9;
      Tol := 20;
      for Times := 1 to 50 do
      begin
        FindDeformedBitmapToleranceIn(BMP, XT, YT, MMX1, MMY1, MMX2, MMY2, Tol, 10, True, Acc);
        if (Acc >= Ref) then
        begin
          TX := XT;
          TY := YT;
          Result := True;
          Exit;
        end;
        if Times mod 5 = 0 then
        begin
          Ref := Ref - 0.05;
          Tol := Tol + 5;
        end;
        Wait(20 + Random(20));
      end;
    end;

  7. #7
    Join Date
    Jan 2007
    Posts
    513
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I allready did, all my variables are in the begin off my script
    Srl simply rocks.

  8. #8
    Join Date
    Apr 2007
    Posts
    51
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Did you declare the image befor using, I had the same error and it fixed it for me.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Well this is stupid...
    By Eugeniu in forum SRL Site Discussion
    Replies: 10
    Last Post: 11-09-2007, 05:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •