Results 1 to 5 of 5

Thread: Unknown identifier 'x' in script

  1. #1
    Join Date
    Jul 2008
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Unknown identifier 'x' in script

    Code:
    program programname;
    
    {.include SRL/SRL.scar}
    
    const
    Knifecolor=7171702;
    Treecolor=1387816;
    Axehead=6111295;
    
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 4;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
    
      Players[0].Name := 'Username';
      Players[0].Pass := 'Password';
      Players[0].Nick := 'ame';
      Players[0].Active := True;
      
      Players[1].Name := 'Username';
      Players[1].Pass := 'Password';
      Players[1].Nick := 'Nick';
      Players[1].Active := True;
      
      Players[2].Name := 'Username';
      Players[2].Pass := 'Password';
      Players[2].Nick := 'Nick';
      Players[2].Active := True;
      
      Players[3].Name := 'Username';
      Players[3].Pass := 'Password';
      Players[3].Nick := 'Nick';
      Players[3].Active := True;
    
    end;
    
    
    procedure logcutting; //This cuts the logs
    begin
       if not(FindObjCustom (x, y, ['Wil', 'low'], [Treecolor], 10)) then //Tells it to logout if logs not found
          Wait(100+random(100));
          Tries := Tries + 1;
          if(Tries = 25)then
          Logout;
          Exit;
    
       if (FindObjCustom(x, y, ['Wil', 'low'], [Treecolor], 10) then //Tells it to cut logs when found
       repeat
        case (Random(2)) of
          1: Mouse(x, y, 4, 4,false);
             ChooseOption('ill');
          2: Mouse(x, y, 4, 4, True);
        end;
      until (InvFull)
    end;
    
    
    procedure DropLogs; // This Drops the logs
    begin
         if FindObjCustom(x, y, ['Willow logs']
         DropTo(1,28);
    end;
    
    procedure AntiBan;
    begin
      if not LoggedIn then Exit;
      case Random(30) of
        1: RandomRClick;
        2: HoverSkill('Woodcutting', False);
        3: RandomMovement;
        4: BoredHuman;
        5: AlmostLogout;
        6: DoEmote(400 +Random(90));
      end;
    end
    
    procedure AntiRandom;
    
    begin
      LampSkill := 'Woodcutting';
      FindNormalRandoms;
      if FindFight then RunAway('N',True,1,5000);
    end;
    
    
    procedure Loop;
    begin
      SetupSRL;
      repeat
        logcutting;
        DropLogs;
        AntiBan;
        AntiRandom;
      until (False)
    end.


    This is the error i get and i do not understand out how to fix it. (I have searched for ways to fix.)

    Failed when compiling
    Line 41: [Error] (12684:23): Unknown identifier 'x' in script

  2. #2
    Join Date
    Aug 2007
    Location
    Georgia, U.S.
    Posts
    890
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    declare x as an integer:

    SCAR Code:
    var
     x, y: integer;

  3. #3
    Join Date
    Jul 2008
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    where do i put this at in my script

  4. #4
    Join Date
    Aug 2007
    Location
    Georgia, U.S.
    Posts
    890
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    at the beginning before constants.

  5. #5
    Join Date
    Jul 2008
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Closed

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Unknown Identifier 'player' in script???
    By cloutier15 in forum OSR Help
    Replies: 6
    Last Post: 05-11-2008, 11:40 AM
  2. Unknown identifier 'Tol' in script
    By Griff in forum OSR Help
    Replies: 6
    Last Post: 05-06-2008, 02:24 PM
  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
  •