Results 1 to 5 of 5

Thread: Line 57: [Error] (14939:29): Unknown identifier 'xs' in script

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

    Default Line 57: [Error] (14939:29): Unknown identifier 'xs' in script

    well, another problem... Line 57: [Error] (14939:29): Unknown identifier 'xs' in script
    here is the script:
    SCAR Code:
    program WoodDroper;
    {.Include SRL/SRL.Scar}
    {.include /SRL/SRL/skill/WoodCutting.scar}
    var
    x,y,LoadsToDo : Integer;
    const
    TreeColor =  3043942;// put the tree color here (yew,willow,tree,etc)
    HowManyLoads = 10;
    procedure SetUp;
    begin
    MakeCompass('N')
    GameTab(4)
    end;
    procedure AntiBan;
    var
    i : Integer;
    begin
    for i := 1 to 10 do
    begin
    case i of
    1: HoverSkill('Woodcutting',false);
    2: wait(1000);
    3: PickUpMouse;
    4:TypeSend('OMG thi is sooo bored');
    5:DoEmote(1+random(19))
    6: if (FindChatText('Hi'))then
     begin
     TypeSend('Dont Disturb noob')
     end;
    7:if (FindChatText('Wc lvl?')) or (FindChatText('Wc lvl')) then
    begin
    TypeSend('better than yours');
    end;
    8: HoverSkill('Prayer',false);
    9: wait(3000+random(500));
    10: PickUpMouse;
    end;
    end;
    end;
    Procedure RandomS;
    begin
    FindLamp('Woodcutting');
    FindNormalRandoms;
    FindTalk;
    if (FindFight) then
    begin
    RunTo('S',true);
    wait (7000+random(1000))
    end;
    end;

    procedure StartChopping;
    begin
    repeat
    FindNormalRandoms;
    MakeCompass('W')
    if (FindColor(x,y,TreeColor,xs,ys,xe,ye: Integer)) then
    begin
    Mouse(x,y,5,5,true);
    if FindEnt then
    begin
    RunTo('N',true);
    wait(10000+random(1000))
    RunBack;
    end;
    end;
    if (not FindColor(x,y,TreeColor,xs,ys,xe,ye: Integer)) then
    begin
    MakeCompass('E') or MakeCompass('S')
    until(InvCount=28)
    end;
    Procedure Drop;
    begin
    if (InvCount=28) then
    begin
    DropAllLogs;
    FindNormalRandoms;
    end;
    end;
    begin
    SetupSRL;
    ActivateClient;
    repeat
    AntiBan;
    RandomS;
    StartChopping;
    Drop;
    until ( LoadsToDo >= LoadsToDo )
    end.
    i want to release this script soon!!!


  2. #2
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    if (FindColor(x,y,TreeColor,xs,ys,xe,ye: Integer)) then

    replace xs, ys,xe,ye by actually numbers on all find color procedures.

    you might want to use MSX1, MSY1, MSX2, MSY2 too look in the whole mainscreen.

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

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

    Default

    thx but i have other little prblems.. it doesnt matter


  4. #4
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    or add thos to your vars, and at the main loop declare them to the screen area

  5. #5
    Join Date
    Jan 2008
    Location
    Alberta
    Posts
    727
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think you'd change this:
    SCAR Code:
    procedure StartChopping;
    begin
    repeat
    FindNormalRandoms;
    MakeCompass('W')
    if (FindColor(x,y,TreeColor,xs,ys,xe,ye: Integer)) then

    into:
    SCAR Code:
    procedure StartChopping;
    var
    xs:integer // replace integer with number or leave it
    ys:integer
    xe:integer
    ye:integer
    begin
    repeat
    FindNormalRandoms;
    MakeCompass('W')
    if (FindColor(x,y,TreeColor,xs,ys,xe,ye: Integer)) then


    Or do what the other people said.

    I never really checked to see if that would compile, so i might be wrong, so i'd take the other peoples suggestions if mine doesn't work, or use this one if theirs doesn't work.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 7
    Last Post: 10-07-2007, 10:41 PM
  2. Replies: 5
    Last Post: 04-25-2007, 09:59 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
  •