Results 1 to 17 of 17

Thread: need help with errors....

  1. #1
    Join Date
    Jun 2007
    Location
    Indiana
    Posts
    153
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default need help with errors....

    heres my code so far not much just getting it started i will add anti randoms auto talk later but i need to get it to compile first please help...

    Updated Script!!

    Code:
    program PowerChopper;
    {.include SRL/SRL.scar}
    const
    Normal=2373688; //change if it doesnt find tree
    procedure FindNormalTree;
    begin
    repeat
    if(FindColor(x,y,Normal,587,397,0,0))then
    MMouse(x,y,0,0);
    Wait(100+random(70));
    Mouse(x,y,0,0,True);
    Wait(600+random(300));
    until(InvFull);
    end;
    begin
    DropAll;
    end;
    begin
    SetupSRL;
    repeat
    RepeatClicking;
    drop;
    until(false);
    end.
    I think i need to set up a var for x and y but idk if thats right...
    The error: Line 9: [Error] (9:14): Unknown identifier 'x' in script

  2. #2
    Join Date
    Jun 2006
    Location
    USA
    Posts
    1,828
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    {.include SRL/SRL.scar}
    Check your spelling.

  3. #3
    Join Date
    Jun 2007
    Location
    Indiana
    Posts
    153
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok now i get a type mismatch in script...i will update the script in the first post each time i fix an error so you can see what im working with...

  4. #4
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    program PowerChopper;
    {.include SRL/SRL.scar}
    const
    Normal='2373688';

    procedure FindNormalTree;
    begin
      begin
        repeat
          if(FindColorTolerance(x,y,Normal,587,397,0,0,5))then
          Mouse(x,y,0,0,True);
          Wait(600+random(300);
        until(InvFull);
      end;
    end;  

    procedure Drop;
    begin
        DropAll;
    end;

    begin
      SetupSRL;
      repeat
        FindNormalTree;
        drop;
      until(false);
    end.
    i think thats whatu want
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  5. #5
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you have an extra begin and end in findnormaltree dan ;p

  6. #6
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    ik...it was all together and i didnt feel like redoing standards...so i just kept it....it should stil compile though
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  7. #7
    Join Date
    Jun 2007
    Location
    Indiana
    Posts
    153
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  8. #8
    Join Date
    Jun 2007
    Location
    Indiana
    Posts
    153
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  9. #9
    Join Date
    Jun 2007
    Location
    Indiana
    Posts
    153
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok new prob like it works and all which is great but like do i have the wait time set up right cuz it clicks like ever half sec and it also doesnt always click on the tree even though i get the color from the tree. it clicks the tree about every 1 out of 5 clicks the others it just clicks on the ground

  10. #10
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    program PowerChopper;
    {.include SRL/SRL.scar}
    const
    Normal='2373688';
     
    procedure FindNormalTree;
    begin
      begin
        repeat
          if(FindColorTolerance(x,y,Normal,587,397,0,0,5))and IsUpText('ree')then
          Mouse(x,y,0,0,True);
          repeat
            Wait(500);
          until InChat('ou have managed to chop some logs')
        until(InvFull);
      end;
    end;  
     
    procedure Drop;
    begin
        DropAll;
    end;
     
    begin
      SetupSRL;
      repeat
        FindNormalTree;
        drop;
      until(false);
    end.
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  11. #11
    Join Date
    Jun 2007
    Location
    Indiana
    Posts
    153
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  12. #12
    Join Date
    Jun 2007
    Location
    Indiana
    Posts
    153
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Updated Script

    Code:
    program PowerChopper;
    {.include SRL/SRL.scar}
    
    const
    Normal=798760; //change if it doesnt find the tree
    
    procedure FindTree;
    begin
     repeat
      if(FindColorTolerance(x,y,Normal,0,0,587,427,5))and IsUpText('ree') then
      Mouse(x,y,0,0,True);
      repeat
       Wait(900);
      until InChat('Hey you got some logs')
     until(InvFull);
    end;
    
    procedure Drop;
    begin
      DropAll;
    end;
    
    begin
     SetupSRL;
     repeat
      FindTree;
      dropAll;
     until(false);
    end.

  13. #13
    Join Date
    Jun 2006
    Location
    USA
    Posts
    1,828
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    dan cardin, that wouldn't still compile.
    And Team_epic, didnt I already fix it for you on MSN?

  14. #14
    Join Date
    Jun 2007
    Location
    Indiana
    Posts
    153
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  15. #15
    Join Date
    Jun 2007
    Location
    Indiana
    Posts
    153
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yeah you did it kinda works but it clicks like crazy and doesnt always find the tree and you didnt answer me when i im'd u

  16. #16
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    team epic change


    SCAR Code:
    if(FindColorTolerance(x,y,Normal,0,0,587,427,5))and IsUpText('ree') then
      Mouse(x,y,0,0,True);
      repeat
       Wait(900);
      until InChat('Hey you got some logs')

    to
    SCAR Code:
    if(FindColorTolerance(x,y,Normal,0,0,587,427,5)) then
      begin
        MMouse(x, y, 0, 0);
        if IsUpText('ree') then
        begin
          Mouse(x,y,0,0,True);
          repeat
            Wait(900);
          until InChat('ome logs')
        end;
      end;

    it should work

  17. #17
    Join Date
    Jun 2007
    Location
    Indiana
    Posts
    153
    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)

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
  •