Results 1 to 7 of 7

Thread: Line 34: [Error] (20614:1): Identifier expected in script

  1. #1
    Join Date
    Jul 2008
    Location
    Lithuania/Norway
    Posts
    90
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Line 34: [Error] (20614:1): Identifier expected in script

    hey i'm started my first script willow cutter and droper. i can't fix my script error. it says:

    Line 34: [Error] (20614:1): Identifier expected in script

    line 34 is "procedure droplogs"

    thanks for helping

    PHP Code:
    {.include SRL/SRL.scar}


    const
    willowcolor14683362;
    willowcolor22444868;
    logcolor11325891;
    logcolor21391941;


    var
    xyiTriesinteger;


    procedure cuttwillow;
    begin
      
    if(FindObjCustom(xy, ['hop''dow'], [willowcolor1willowcolor2], 7))then
      begin
      
    //repeat - remove this line
      
    case (Random(2)) of
        0
    begin
          Mouse
    (xy44,false);
          
    wait(300+random(200));  //- it can take some time for rs to show the option menu
          
    ChooseOption('hop');
          
    wait(5000+random(800));
        
    end;  //- every begin needs an end!
        
    1begin
          Mouse
    (xy44True);
          
    wait(5000+random(800));
        
    end;
      
    end;
    end;

    procedure Droplogs;
    begin
    if FindObjCustom(xy, ['log'], [logcolor1logcolor2], 7then
    for := 2 to 28 do
    dropItem(i);
    end;

    begin
      SetupSRL
    ;
      
    repeat
        repeat
          cuttwillow
    ;
        
    until(InvFull)
        
    Droplogs;
      
    until (False)
    end

  2. #2
    Join Date
    Oct 2009
    Location
    Melb, Australia
    Posts
    179
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by m4r1us View Post
    hey i'm started my first script willow cutter and droper. i can't fix my script error. it says:

    Line 34: [Error] (20614:1): Identifier expected in script

    line 34 is "procedure droplogs"

    thanks for helping

    PHP Code:
    {.include SRL/SRL.scar}


    const
    willowcolor14683362;
    willowcolor22444868;
    logcolor11325891;
    logcolor21391941;


    var
    xyiTriesinteger;


    procedure cuttwillow;
    begin
      
    if(FindObjCustom(xy, ['hop''dow'], [willowcolor1willowcolor2], 7))then
      begin
      
    //repeat - remove this line
      
    case (Random(2)) of
        0
    begin
          Mouse
    (xy44,false);
          
    wait(300+random(200));  //- it can take some time for rs to show the option menu
          
    ChooseOption('hop');
          
    wait(5000+random(800));
        
    end;  //- every begin needs an end!
        
    1begin
          Mouse
    (xy44True);
          
    wait(5000+random(800));
        
    end;
      
    end;
    end;

    procedure Droplogs;
    begin
    if FindObjCustom(xy, ['log'], [logcolor1logcolor2], 7then
    for := 2 to 28 do
    dropItem(i);
    end;

    begin
      SetupSRL
    ;
      
    repeat
        repeat
          cuttwillow
    ;
        
    until(InvFull)
        
    Droplogs;
      
    until (False)
    end
    You don't have a program name at the start?
    eg.
    Program WillowChopper;

  3. #3
    Join Date
    Jul 2008
    Location
    Lithuania/Norway
    Posts
    90
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    we hawe two procedures:
    "procedure cuttwillow;"
    "procedure droplogs;"

  4. #4
    Join Date
    Oct 2009
    Location
    Melb, Australia
    Posts
    179
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What? I mean, you need to have the program name defined at the very beginning:
    PHP Code:
    Program WillowChopper;

    {.include 
    SRL/SRL.scar}
    const
    willowcolor14683362;
    willowcolor22444868;
    logcolor11325891;
    logcolor21391941;

    var
    xyiTriesinteger;


    procedure cuttwillow;
    begin
      
    if(FindObjCustom(xy, ['hop''dow'], [willowcolor1willowcolor2], 7))then
      begin
      
    //repeat - remove this line
      
    case (Random(2)) of
        0
    begin
          Mouse
    (xy44,false);
          
    wait(300+random(200));  //- it can take some time for rs to show the option menu
          
    ChooseOption('hop');
          
    wait(5000+random(800));
        
    end;  //- every begin needs an end!
        
    1begin
          Mouse
    (xy44True);
          
    wait(5000+random(800));
        
    end;
      
    end;
    end;

    procedure Droplogs;
    begin
    if FindObjCustom(xy, ['log'], [logcolor1logcolor2], 7then
    for := 2 to 28 do
    dropItem(i);
    end;

    begin
      SetupSRL
    ;
      
    repeat
        repeat
          cuttwillow
    ;
        
    until(InvFull)
        
    Droplogs;
      
    until (False)
    end

  5. #5
    Join Date
    Jul 2008
    Location
    Lithuania/Norway
    Posts
    90
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok i added Program WillowChopper;
    but still getting same error

  6. #6
    Join Date
    Oct 2009
    Location
    Melb, Australia
    Posts
    179
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh ok sorry, I looked closer and you are missing an "end;" for your case.
    PHP Code:
    procedure cuttwillow;
    begin
      
    if(FindObjCustom(xy, ['hop''dow'], [willowcolor1willowcolor2], 7))then
      begin
      
    //repeat - remove this line
      
    case (Random(2)) of
        0
    begin
            Mouse
    (xy44,false);
            
    wait(300+random(200));  //- it can take some time for rs to show the option menu
            
    ChooseOption('hop');
            
    wait(5000+random(800));
           
    end;  //- every begin needs an end!
        
    1begin
            Mouse
    (xy44True);
            
    wait(5000+random(800));
           
    end;
        
    end;
      
    end;
    end

  7. #7
    Join Date
    Jul 2008
    Location
    Lithuania/Norway
    Posts
    90
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thank you!! thank you again! it works

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •