Results 1 to 7 of 7

Thread: Going Crazy!!! :fiery:

  1. #1
    Join Date
    Oct 2009
    Posts
    55
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Going Crazy!!! :fiery:

    I'm going crazy trying to figure out how to get my script to work. It is a WoodCutter but I keep getting errors. Where do I put my Begin?
    Code:
    program VarrockWoodCutter;
    
    Var x,y : Integer;
    
    Procedure CutOak;
    Begin;
    Findcolor(x,y,3241834,5,5,515,340)
    Wait(5000)
    end;
    End;
    begin;
     CutOak
    end.
    This is My Error:
    Line 10: [Error] (10:1): 'BEGIN' expected in script C:\Program Files\SCAR 3.21\Scripts\Varrock Oak Cutter.scar

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

    Default

    You have an extra end in there. Take out the end with capital E. And, your begin for the main loop doesn't need a semicolon. This wouldn't work for very long anyways, but good start!

  3. #3
    Join Date
    Oct 2006
    Posts
    500
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You shouldn't put a semi-colon after a begin

    Here's your fixed script, with fixed standards

    Code:
    program VarrockWoodCutter;
    
    var
      x, y : Integer;
    
    procedure CutOak;
    begin
      Findcolor(x, y, 3241834, 5, 5, 515, 340)
      Wait(5000)
    end;
    
    begin;
     CutOak
    end.
    Last edited by Rick; 10-10-2009 at 04:20 PM.

  4. #4
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Also, a begin does not need ;

    So end up with:

    SCAR Code:
    program VarrockWoodCutter;

    var
      X, Y : Integer;

    procedure CutOak;
    begin
      FindColor(X, Y, 3241834, 5, 5, 515, 340)
      Wait(5000)
    end;

    begin
     CutOak;
    end.
    Last edited by Rich; 10-10-2009 at 05:41 PM.
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  5. #5
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program VarrockWoodCutter;

    var
      x, y : Integer;

    procedure CutOak;
    begin
      Findcolor(x, y, 3241834, 5, 5, 515, 340);
      Wait(5000);
    end;

    begin
     CutOak;
    end.

    Both of your codes are wrong you still have

    begin;
    CutOak;
    end.

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  6. #6
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Zerghunter3000 View Post
    I'm going crazy trying to figure out how to get my script to work. It is a WoodCutter but I keep getting errors. Where do I put my Begin?
    Code:
    program VarrockWoodCutter;
    
    Var x,y : Integer;
    
    Procedure CutOak;
    Begin;
    Findcolor(x,y,3241834,5,5,515,340)
    Wait(5000)
    end; // <- No need for end
    End;// <- No need for end
    begin;// <- No need for begin
     CutOak
    end.
    This is My Error:
    Line 10: [Error] (10:1): 'BEGIN' expected in script C:\Program Files\SCAR 3.21\Scripts\Varrock Oak Cutter.scar
    Is this your script? If not, please give a link to the script.
    I marked the useless thingss above.

    I suggest you go to tutorial island section and read some beginner tutorials about
    • the very basics
    • if - then statements
    • procedures and functions
    • color finding

  7. #7
    Join Date
    Oct 2006
    Posts
    500
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

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
  •