Results 1 to 5 of 5

Thread: Stupid Compile Error

  1. #1
    Join Date
    Mar 2008
    Location
    ::1
    Posts
    915
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Stupid Compile Error

    I'm going to go for SRL mems soon and I made a million scripts. Then, I decide to make a cow fighter to go for mems. But, seems that I am stupid and can't see an error right under my nose. I get the semicolon expected in script error on the line I commented in the below procedure...
    SCAR Code:
    function TniffocFindCow: boolean;
    //Tol:= 30
    //Hmod:= .1
    //Smod:= .14
    var
        CTS,i,ATPAHigh: Integer;
        TPA: TPointArray;
        ATPA: T2DPointArray;
        foundCow: Boolean;

    begin
        CTS:= GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorSpeed2Modifiers(0.1, 0.14);
        FindColorsSpiralTolerance(x,y,TPA,9344154, MSX1,MSY1,MSX2,MSY2,30);
        ColorToleranceSpeed(CTS);
        SetColorSpeed2Modifiers(0.2,0.2);
        if(Length(TPA) > 0)then begin
            ATPA:= SplitTPAEx(TPA,10,10);
            ATPAHigh:= High(ATPA);
            for i:=0 to ATPAHigh do begin
                MMouse(ATPA[i].x, ATPA[i].y, 2, 2); // This ONE!
                if(IsUpText('ow'))then begin
                    GetMousePos(x,y);
                    Mouse(x,y,0,0,true);
                    Result:= true;
                    Writeln('Found a Cow!');
                    Exit;
                end;
            end;
            Writeln('Didn''t find a cow with the cow colors!');
            Result:= false;
        end else begin
            Writeln('Didn''t find a single cow color.');
            Result:= false;
        end;
    end;

    Records and Types Save Code (and make you look better)
    Quote Originally Posted by Wizzup? View Post
    Is it possible to make Runescape a 2D game with this?... That would greatly simplify... Just about anything.

  2. #2
    Join Date
    Mar 2008
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think that should fix it... Fix your standards, look at that script, and if you have any questions MSN message me at lolzorzatmyself@hotmail.com

    SCAR Code:
    function TniffocFindCow: boolean;
    //Tol:= 30
    //Hmod:= .1
    //Smod:= .14
    var
      CTS,i,ATPAHigh: Integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
      foundCow: Boolean;

    begin
      CTS:= GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.1, 0.14);
      FindColorsSpiralTolerance(x,y,TPA,9344154, MSX1,MSY1,MSX2,MSY2,30);
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(0.2,0.2);
      if(Length(TPA) > 0)then
      begin
        ATPA:= SplitTPAEx(TPA,10,10);
        ATPAHigh:= High(ATPA);
        for i:=0 to ATPAHigh do
        If MiddleTPAEx(ATPA[i],x,y) then
        begin
          MMouse(x, y, 2, 2); // This ONE!
          if(IsUpText('ow'))then
          begin
            GetMousePos(x,y);
            Mouse(x,y,0,0,true);
            Result:= true;
            Writeln('Found a Cow!');
            Exit;
          end;
        end;
      Writeln('Didn''t find a cow with the cow colors!');
    end;

  3. #3
    Join Date
    Mar 2008
    Location
    ::1
    Posts
    915
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    OHHHH MiddleTPA!!!!!

    Silly me...

    Ty and rep+

    Records and Types Save Code (and make you look better)
    Quote Originally Posted by Wizzup? View Post
    Is it possible to make Runescape a 2D game with this?... That would greatly simplify... Just about anything.

  4. #4
    Join Date
    Mar 2008
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by tniffoc View Post
    Sorry, your fix didn't work any suggestions?
    just edited, works now

  5. #5
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Your standards are off, here are correct ones:

    SCAR Code:
    function TniffocFindCow: boolean;
    //Tol:= 30
    //Hmod:= .1
    //Smod:= .14
    var
      CTS,i,ATPAHigh: Integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
      foundCow: Boolean;
     
    begin
      CTS:= GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.1, 0.14);
      FindColorsSpiralTolerance(x,y,TPA,9344154, MSX1,MSY1,MSX2,MSY2,30);
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(0.2,0.2);
      if(Length(TPA) > 0)then
      begin
        ATPA:= SplitTPAEx(TPA,10,10);
        ATPAHigh:= High(ATPA);
        for i:=0 to ATPAHigh do
          If MiddleTPAEx(ATPA[i],x,y) then
          begin
            MMouse(x, y, 2, 2); // This ONE!
            Wait(RandomRange(100, 150));
            if(IsUpText('ow'))then
            begin
              GetMousePos(x,y);
              Mouse(x,y,0,0,true);
              Result:= true;
              Writeln('Found a Cow!');
              Exit;
            end;
          end;
      Writeln('Didn''t find a cow with the cow colors!');
    end;

    Btw, watch for the dairy cows .
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Compile error.
    By Vivoxity in forum OSR Help
    Replies: 6
    Last Post: 05-12-2008, 03:31 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
  •