Results 1 to 8 of 8

Thread: How to Fix my Errors?

  1. #1
    Join Date
    Dec 2007
    Location
    I'm the short man in all those arcade games you play
    Posts
    169
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default How to Fix my Errors?

    I have created a "Power-Woodcutting" script.

    It is only my 3rd script, so please bare with me.

    I am getting tons of errors in this script, could anyone tell me where I have gone wrong?

    SCAR Code:
    //When a word(s) is bolded it means you must insert something there.




       program; SimplePowerChopper;
    {.include SRL/SRL.scar}

    var
    i,x,y:Integer;
    Loads = Integer;
    Dropped = Integer;
    Prog = Integer;

    const
      TreeColor1 = PUT COLOR HERE;//Insert tree color here
      TreeColor2 = PUT 2ND COLOUR HERE;//Insert 2nd tree color here
      TotalLoads = 10;//How many loads you want to cut

    procedure CutTree; //Cuts the tree you specified
    begin
      i:= 0;
      repeat
        i:=i + 1;
        if(FindColor(x,y,TreeColor1,0,0,700,700)) or
        (FindColor(x,y,TreeColor2,0,0,700,700)) and
        IsTextUp('Cut') then
        begin
          Wait(1000 +random(500))
          Mouse(x, y, 3, 3, True);
          Wait(5000 +random(500));
        end;
        Wait(700);
      until(InvFull);
    end;

     Procedure srlinformacion;
    begin
      SRLID := '3322';
      SRLPassword := 'password';
    end;

    procedure Drop;
       begin
    If (InvFull) then
       begin
    DropFromInvSlot (2, 28);
       end else
     Drop;
       end;
       
    procedure DoAntiRandoms;
    begin
    FindTalk;
    FindNormalRandoms;
    if (FindFight = true) then
    begin
    RunAwayDirection('N');
    Wait(1000+random(2000));
    RunBack;
    end;

    begin

     SetupSRL;
     Drop;
     end.

  2. #2
    Join Date
    Dec 2007
    Location
    I'm the short man in all those arcade games you play
    Posts
    169
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Would this be ok to post in first script if I get the errors fixed?

  3. #3
    Join Date
    Feb 2007
    Location
    EST (US East Coast)
    Posts
    250
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Here are the corrections I made to solve your errors.

    SCAR Code:
    program SimplePowerChopper;
    Removed a ; after program. Only need one.

    SCAR Code:
    var
    i,x,y:Integer;
    Loads : Integer;
    Dropped : Integer;
    Prog : Integer;
    Variables are declared as varname : Vartype; not with an =.


    SCAR Code:
    procedure CutTree; //Cuts the tree you specified
    begin
      i:= 0;
      repeat
        i:=i + 1;
        if(FindColor(x,y,TreeColor1,0,0,700,700)) or
        (FindColor(x,y,TreeColor2,0,0,700,700)) and
        IsUpText('Cut') then //you had IsTextUp instead of IsUpText.
        begin
          Wait(1000 +random(500))
          Mouse(x, y, 3, 3, True);
          Wait(5000 +random(500));
        end;
        Wait(700);
      until(InvFull);
    end;

    SCAR Code:
    procedure Drop;
    begin
      If (InvFull) then
      begin
        //DropFromInvSlot (2, 28); I couldn't find this command in SRL, hence your error. Try another drop command.
      end else
      Drop; //This wont even work. You cant call the procedure you're writing during it, if that makes any sense.
    end;

    SCAR Code:
    procedure DoAntiRandoms;
    begin
      FindTalk;
      FindNormalRandoms;
      if (FindFight = true) then
      begin
        RunAwayDirection('N');
        Wait(1000+random(2000));
        RunBack;
      end;
    end;//forgot an end;
    Temporarily inactive.

  4. #4
    Join Date
    Dec 2007
    Location
    I'm the short man in all those arcade games you play
    Posts
    169
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    WOW, Thanks so much for that.

    I'm going to fix those and try running this.

    Any ideas on another drop command?

  5. #5
    Join Date
    Feb 2007
    Location
    EST (US East Coast)
    Posts
    250
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    DropItem(i : Integer); will drop the item number specified.

    Or DropToPosition(StartPosition, EndPosition : Integer); could be another way to do it.
    Temporarily inactive.

  6. #6
    Join Date
    Nov 2007
    Location
    SCAR central
    Posts
    116
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by souppy View Post
    I have created a "Power-Woodcutting" script.

    It is only my 3rd script, so please bare with me.

    I am getting tons of errors in this script, could anyone tell me where I have gone wrong?

    SCAR Code:
    //When a word(s) is bolded it means you must insert something there.




       program; SimplePowerChopper;
    {.include SRL/SRL.scar}

    var
    i,x,y,loads,dropped,prog:Integer;

    const
      TreeColor1 = PUT COLOR HERE;//Insert tree color here
      TreeColor2 = PUT 2ND COLOUR HERE;//Insert 2nd tree color here
      TotalLoads = 10;//How many loads you want to cut

    procedure CutTree; //Cuts the tree you specified
    begin
      i:= 0;
      repeat
        i:=i + 1;
        if(FindColor(x,y,TreeColor1,0,0,700,700)) or
        (FindColor(x,y,TreeColor2,0,0,700,700)) and
        IsTextUp('Cut') then
        begin
          Wait(1000 +random(500))
          Mouse(x, y, 3, 3, True);
          Wait(5000 +random(500));
        end;
        Wait(700);
      until(InvFull);
    end;

     Procedure srlinformacion;
    begin
      SRLID := '3322';
      SRLPassword := 'password';
    end;

    procedure Drop;
       begin
    If (InvFull) then
       begin
    DropFromInvSlot (2, 28);
       end else
     Drop;
       end;
       
    procedure DoAntiRandoms;
    begin
    FindTalk;
    FindNormalRandoms;
    if (FindFight = true) then
    begin
    RunAwayDirection('N');
    Wait(1000+random(2000));
    RunBack;
    end;

    begin

     SetupSRL;
     Drop;
     end.
    So many errors...

    This is your new script...


    SCAR Code:
    program SimplePowerChopper;
    {.include SRL/SRL.scar}

    var
    i,x,y,loads,dropped,prog:Integer;
    //Don't need a new line for the same thing (you  canhave integers on all 1 line but when it comes to the end of 1 line you need to put integers at the end)


    const
      TreeColor1=1;
      TreeColor2=1;//Insert tree color here
      TotalLoads=10;//How many loads you want to cut

      Procedure srlinformacion; //Goes here and above goes the chars info
    begin
      SRLID := '3322';
      SRLPassword := 'password';
    end;


    procedure CutTree; //Cuts the tree you specified
    begin
      i:= 0; // You havent used this in your script, you should take it out, theres //a easier way
      repeat
        i:=i + 1;
        if(FindColor(x,y,TreeColor1,0,0,700,700)) or
        (FindColor(x,y,TreeColor2,0,0,700,700)) and
        If (IsTextUp('ree')) then // Dont use capitals, use a part of the word like a nick  also you needed a if there and a '(' there aswell
        begin
          Wait(1000 +random(500))
          Mouse(x, y, 3, 3, True);
          Wait(5000 +random(500));
        end;
        Wait(700);
      until(InvFull);
    end;

     Procedure srlinformacion; // This goes below your const
    begin
      SRLID := '3322';
      SRLPassword := 'password';
    end;

    procedure Drop;
       begin
    If (InvFull) then
       begin
    DropFromInvSlot (2, 28);
        if(Invfull) then
    end;//Needs some fail safes(if something goes wrong you have back-up)

    procedure DoAntiRandoms;
    begin
    FindTalk;
    FindNormalRandoms;
    if (FindFight = true) then
    begin
    RunAwayDirection('N');
    Wait(1000+random(2000));
    RunBack;
    end;

    begin

     SetupSRL;
     CutTree;
     Doantirandoms;//Need this between here
     Drop;//You need every procedure here that is to do with the woodcutting 1
            //Don't put in the srl info
     end.

    done...
    Click here for Rora's Power Woodcutter!
    Testers needed!
    |
    |
    |
    |
    V



    http://www.fenjer.com/adnan/SRL//100...Woodcutter.png

    http://photos33.flickr.com/38918814_8370ddb570_m.jpg




    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig.

  7. #7
    Join Date
    Nov 2007
    Location
    SCAR central
    Posts
    116
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thats all i have done so far, i dont no why it comes with the syntax error...
    Click here for Rora's Power Woodcutter!
    Testers needed!
    |
    |
    |
    |
    V



    http://www.fenjer.com/adnan/SRL//100...Woodcutter.png

    http://photos33.flickr.com/38918814_8370ddb570_m.jpg




    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig.

  8. #8
    Join Date
    Nov 2007
    Location
    SCAR central
    Posts
    116
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you also need more anti randoms, failsafes, maybe a auto responder, a proggi and a sig and a players array which is vital
    Click here for Rora's Power Woodcutter!
    Testers needed!
    |
    |
    |
    |
    V



    http://www.fenjer.com/adnan/SRL//100...Woodcutter.png

    http://photos33.flickr.com/38918814_8370ddb570_m.jpg




    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Errors.....
    By MrDeeds in forum OSR Help
    Replies: 3
    Last Post: 06-04-2007, 07:44 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
  •