Results 1 to 5 of 5

Thread: Help with error

  1. #1
    Join Date
    Dec 2006
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Help with error

    SCAR Code:
    Program TreeCutter;
    {.include Si.scar}
    //For this to work you need to change the color to the color of the tree
    //you want to cut!///////////////////
    Var x,y : Integer;

    Procedure CutTrees;
    Begin
    repeat;
    Findcolor(x,y,540985,5,5,515,340)
    Mouse(x,y,1,1,true)
    wait(4900)
    end;

    begin
    CutTrees
    repeat CutTrees;
    until(INVFULL)
    Procedure dropping;
    begin
      logsinvo :=CountItemDtm(logdtm);
      Writeln('Dropping ' + inttostr(logsinvo) + ' Logs');
      DropTo(2,28);
      LoadsDone := LoadsDone + 1;
      TimeDropped := TimeDropped + 1;
      Played;
    End;
    Repeat CutTrees;
    until (INVFULL)
    until (false)
    end.
    is the script and the error is this (Failed when compiling
    Line 13: [Error] (3116:1): Identifier expected in script F:\Program Files\SCAR 2.03\Scripts\TreeCutter.scar) Please help me!

  2. #2
    Join Date
    Dec 2006
    Location
    London, England
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you forgot an until after your repeat it should look like this

    Code:
    procedure CutTrees;
    begin
      repeat
        Findcolor(x,y,540985,5,5,515,340)
        Mouse(x,y,1,1,true)
        wait(4900)
      until(when you want it to stop(false for endless loop))
    end
    that should fix it, hopefully!

  3. #3
    Join Date
    Dec 2006
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks!

  4. #4
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    add a +random(somenumber) to the wait, and use SRL, I'm pretty sure don't need to change anything except played and the vars.

  5. #5
    Join Date
    Dec 2006
    Posts
    47
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok thanks guys now let this topic slowly die...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Line 135: [Error] (14845:1): Syntax error in script
    By AbsTrACt'^.| in forum OSR Help
    Replies: 16
    Last Post: 05-23-2008, 01:14 PM
  2. Replies: 5
    Last Post: 02-26-2008, 04:14 PM
  3. Smart error and Some kind of Math.scar error
    By FagetHax0r in forum OSR Help
    Replies: 6
    Last Post: 02-24-2008, 10:43 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
  •