Results 1 to 7 of 7

Thread: Unknown identifier 'Tol' in script

  1. #1
    Join Date
    Mar 2007
    Location
    Alberta, Canada
    Posts
    1,780
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default Unknown identifier 'Tol' in script

    I am a beginner scripter, and in line 137 of my fishing guild lobster fisher, i get unknown identifier 'tol' in script

    heres the line with error (its in the main line)

    begin
    SetupSRL;
    ActivateClient;
    ClickOnExistingUserButton;
    TypeInUserandPass;
    CompleteLogin;
    GoToLobsterFishingSpot;
    Findspot
    BackToBank
    DepositLobster
    end.

    findspot doesnt work in the main line, without in the mainline, i get no errors.
    heres the function

    function FindSpot(Tol: Integer): Boolean;
    var
    a,b: Integer;
    Box,Box2: TBox;
    begin
    if Not LoggedIn then Exit;
    if(FindColorTolerance(a,b,14796717,0,0,750,500,Tol ))then
    begin
    Mouse(a,b,2,2,False)
    FTWait(2)
    if(ChooseOption('Cage'))then
    begin
    Result:= True;
    FFlag(0);
    end else
    begin
    Box:= IntToBox(a-30,b-30,a+30,b+30)
    if FindColorSkipBoxTolerance(a,b,14796717,0,0,750,500 ,Tol,Box)then
    begin
    Mouse(a,b,2,2,false)
    FTWait(2)
    if ChooseOption('Cage') then
    begin
    Result:= True;
    FFlag(0)
    end else
    begin
    Box2:= IntToBox(a-30,b-30,a+30,b+30)
    if FindColorSkipBoxArrayTolerance(a,b,14796717,0,0,75 0,500,Tol,[Box,Box2]) then
    begin
    Mouse(a,b,2,2,false)
    FTWait(2)
    if ChooseOption('Cage') then
    begin
    Result:= True;
    FFlag(0)
    end;
    end;
    end;
    end;
    end;
    end;
    end;
    {FUNCTION FIND SPOT BY KING OF KNIVES}

  2. #2
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Use SCAR Tags([SCAR] and [/]). And post the line where it says the error.


  3. #3
    Join Date
    Mar 2007
    Location
    Alberta, Canada
    Posts
    1,780
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    how do you use scar tags? just put ([]) around the part?

  4. #4
    Join Date
    Mar 2008
    Location
    Indiana
    Posts
    192
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    [SCAR*] Script Here [/SCAR*]


    You'll have to take out the "*" for it to work.

    It will look like this:
    SCAR Code:
    Program Test;
    Begin
    End.

    Your script: with standards
    SCAR Code:
    begin
      SetupSRL;
      ActivateClient;
      ClickOnExistingUserButton;
      TypeInUserandPass;
      CompleteLogin;
      GoToLobsterFishingSpot;
      Findspot
      BackToBank
      DepositLobster
    end.

    SCAR Code:
    function FindSpot(Tol: Integer): Boolean;
    var
      a,b: Integer;
      Box,Box2: TBox;
    begin
      if Not LoggedIn then Exit;
      if(FindColorTolerance(a,b,14796717,0,0,750,500,Tol ))then
       begin
        Mouse(a,b,2,2,False)
        FTWait(2)
        if(ChooseOption('Cage'))then
         begin
          Result:= True;
          FFlag(0);
        end else
         begin
          Box:= IntToBox(a-30,b-30,a+30,b+30)
          if FindColorSkipBoxTolerance(a,b,14796717,0,0,750,500 ,Tol,Box)then
           begin
            Mouse(a,b,2,2,false)
            FTWait(2)
            if ChooseOption('Cage') then
             begin
              Result:= True;
              FFlag(0)
             end else
             begin
              Box2:= IntToBox(a-30,b-30,a+30,b+30)
              if FindColorSkipBoxArrayTolerance(a,b,14796717,0,0,75 0,500,Tol,[Box,Box2]) then
               begin
                Mouse(a,b,2,2,false)
                FTWait(2)
                if ChooseOption('Cage') then
                 begin
                  Result:= True;
                  FFlag(0)
                 end;
               end;
             end;
           end;
         end;
       end;
    end;

  5. #5
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    The reason why is doesn't work is that you need the extra parameter.

    See your function is
    SCAR Code:
    FindSpot(Tol:Integer)

    This means that in your mainloop you need the Brackets which contain the tol.
    Otherwise you will get the error, you have:

    SCAR Code:
    begin
    SetupSRL;
    ActivateClient;
    ClickOnExistingUserButton;
    TypeInUserandPass;
    CompleteLogin;
    GoToLobsterFishingSpot;
    Findspot
    BackToBank
    DepositLobster
    end.

    You need:

    SCAR Code:
    begin
    SetupSRL;
    ActivateClient;
    ClickOnExistingUserButton;
    TypeInUserandPass;
    CompleteLogin;
    GoToLobsterFishingSpot;
    Findspot(35); // Tolerance ;)
    BackToBank
    DepositLobster
    end.

    Hope I Helped

  6. #6
    Join Date
    Dec 2007
    Location
    Wizzup?'s boat
    Posts
    1,013
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Dammit Nauman! you always just get to these forums before me...
    Project: Welcome To Rainbow

  7. #7
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by benjaa View Post
    Dammit Nauman! you always just get to these forums before me...
    Yeah

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Unknown identifier 'x' in script
    By xaviar in forum OSR Help
    Replies: 4
    Last Post: 07-03-2008, 12:26 AM
  2. Unknown Identifier 'player' in script???
    By cloutier15 in forum OSR Help
    Replies: 6
    Last Post: 05-11-2008, 11:40 AM
  3. Unknown identifier 'IsUpTextMulti' in script
    By Hitman543 in forum OSR Help
    Replies: 7
    Last Post: 02-25-2008, 07:42 PM
  4. Unknown identifier!?!?! (powercutter script)
    By lil rahmer662 in forum OSR Help
    Replies: 3
    Last Post: 01-27-2008, 09:40 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
  •