Results 1 to 4 of 4

Thread: File access error

  1. #1
    Join Date
    Dec 2006
    Location
    Florida
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default File access error

    when i use this code i get this message
    Successfully compiled (1177 ms)
    File access error
    SRL Compiled in 10 msec
    Successfully executed
    and every where i've read, no one knew what it did but said it didn't matter. But i have this code that looks like it should work but won't can someone help
    Code:
    Procedure MinetheCoal;
    var
    x,y,Tries:integer;
    begin
      Tries:=0;
      Mouse(262,185 ,1 ,1 ,true);
      repeat
        if not FindColortolerance(x, y, Coal_Color1, MSX1, MSY1, MSX2, MSY2, 10) then
        begin
          wait(100+random(400));
          Tries:= Tries + 1;
        end else break;
      until (Tries = 20);
      if Tries = 20 then
      begin
        Writeln('cant find ore')
        terminatescript;
      end;
      repeat
        if FindColorTolerance(x, y, Coal_Color1, MSX1, MSY1, MSX2, MSY2, 7) then
        begin
          wait(500+random(1000));
          Mouse(x, y, 4, 4,true);
          wait(8000+random(7000));
        end;
      until (InvFull);
    end;
    I've done everything i could think of to make it work. Tried it all multiple mines, with high and low resolution, unsigned applet, it can never find the coal, it just clicks at my character and does nothing out, the only thing i can think of is the file access error which i don't know what does. And the Coal_Color1 is declared as a constant with a value of 2703167

  2. #2
    Join Date
    Jan 2008
    Location
    Stanford, CA
    Posts
    329
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Maybe you should read up on TPAs? They are much more handy when it comes to color-finding. Since FindColorTolerance is looking for a single color that might be the problem. I suggest you learn TPAs.

    About the file access error. It might be something wrong with the SCAR version itself. Why don't you try a different version of SCAR or redownload/reinstall it.

  3. #3
    Join Date
    Dec 2006
    Location
    Florida
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i reinstalled scar and SRL, but still i have the color finding problem. And the file access error is still there.
    With TPAs from what i saw you still have to use FindColorsTolerance to get the original points in the array, which would require fixing this problem. And i didn't just limit the color to that one, i tested probably over 20 colors i picked from coal.
    It isn't just findcolortolerance either, none of the finding procedures or functions seem to work. findobj and findobjcustom don't work. findspiraltolerance doesn't work. I even triedto find the red color in a paint file that made that was all white but had one red block and it couldn't find it.

    Please can someone help.

  4. #4
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ask Freddy about this.. Im totally stumped..

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. file access error :(
    By Griff in forum OSR Help
    Replies: 3
    Last Post: 05-22-2008, 07:12 AM
  2. File Access Error The Nothing?
    By belgin fish in forum OSR Help
    Replies: 6
    Last Post: 03-19-2008, 07:30 PM

Posting Permissions

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