Results 1 to 4 of 4

Thread: SMART/SCAR/Script crash?

  1. #1
    Join Date
    May 2007
    Posts
    28
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default SMART/SCAR/Script crash?

    For no reason that I can find, when I run this script the smart client will completely freeze or blackscreen and after maybe 10-15 seconds put me at the login screen. I've isolated the problem to this procedure...

    SCAR Code:
    procedure FindFountain;
    Var
      Full : Integer;
      Empty : Integer;
      WaitTime : Integer;
      x1, y2 : Integer;
      FountTPA : TPointArray;
      FountPoint : TPoint;
      i : integer;
      Ax, Ay : Integer;
    Begin
      Flag;
      wait(700);
      Flag;
      FindColorsTolerance(FountTPA, 14066312, MSX1, MSY1, MSX2, MSY2, 90);
      if Length(FountTPA) = 0 then
        begin
          WriteLn('Couldn''t find FountTPA');
          exit;
        end;
        for i := 0 to High(FountTPA)do
        Begin
          FountPoint := FountTPA[Random(Length(FountTPA))];
          Full := DTMFromString('78DA63DCCEC4C0B09F9101192C5B7998811F4' +
          '88344FF0301E361A09A7DA86A20B2301248EF03AAD94A40CD4EA0' +
          '9A5504D46C05AAD94940CD36A09A6304D4EC27AC060007921083');
          Empty := DTMFromString('78DA63BCC1C0C060C1C8800CCACA2B18F8813' +
          '448F43F10303E0032CC51D540646124907E0C241C08A8B948849A' +
          'EB40C285809A2B40C214BF1A0026970C07');
          if(FindDTM(Empty, x1, y2, MIX1, MIY1, MIX2, MIY2))then
            begin
              Mouse(x1, y2, 5, 5, true);
              Mouse(FountPoint.x, FountPoint.y, 5, 5, true);
              WaitTime := 0;
              repeat
                Inc(waitTime);
                if(WaitTime = 30) then
                  begin
                    WriteLn('Search got wrong coords or lost? Breaking Loop...');
                    break;
                  end;
                Wait(1000);
                AntiBan;
                AntiRandom;
              until not(FindDTM(Empty, Ax, Ay, MIX1, MIY1, MIX2, MIY2))
            end;
        end;
    FreeDTM(Full);
    FreeDTM(Empty);
    end;
    Neither the 'search got wrong coords or lost' nor 'couldn't find FountTPA' lines come up in the debug box when it crashes and the crash always happens after the tpoint has been found and clicked on. The repeat until loop actually runs smooth until there are no empty DTMS left on the screen. I think its something with the until not(FindDTM(Empty, Ax, Ay, MIX1, MIY1, MIX2, MIY2)) that makes it crash but i'm not sure. I made sure the DTM is correct (plus it uses the same dtm successfully only 10 or so lines up...i'm puzzled...

    edit:
    i took out every element of the script one by one where the error occurs (and replaced until not(finddtm(empty) with until(false) and i still get the error, I'm truly confused. HELP D:

  2. #2
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    im not the best at scripting, but shouldnt there be a ; after until not(FindDTM(Empty, Ax, Ay, MIX1, MIY1, MIX2, MIY2))

  3. #3
    Join Date
    May 2007
    Posts
    28
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nice catch but didn't fix my freezing. This is pissing me off, going to be off for a good 20 hours, please post some replies!

    edit: and yes, it is this procedure that's the problem. and i now think it has something to do with the TPA's but i have no clue what

  4. #4
    Join Date
    Oct 2008
    Posts
    33
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This may sound a bit strange but lately for me I have been getting the same problem with it freezing because of virtual memory...check it out you may have to restart the computer every so often to reset it, dunno but it fixed my problem. Also dont run to many programs while using scar. check it out...my or may not fix your problem, it did 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. LoginPlayer; causes SMART to crash
    By hylian_loach in forum OSR Help
    Replies: 4
    Last Post: 05-16-2008, 02:08 AM
  2. Why does this script crash/hang SCAR?
    By botmaster in forum OSR Help
    Replies: 10
    Last Post: 04-08-2007, 12:52 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
  •