Results 1 to 8 of 8

Thread: Error with first script !help!

  1. #1
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Error with first script !help!

    Thnx for helping every1 JR helped me figure it out

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

    Default

    When mouse is in the top left it means the coords are 0,0, probably means findcolorspiral(x,y,treecolor,3,3,515,336 failed, so use tolerance.

  3. #3
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok ill try that

  4. #4
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    amm i put tolerance to 1, 1 and it still just goes to right corner any way to make new color finding procedure that will work better?

  5. #5
    Join Date
    Nov 2006
    Posts
    120
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Tolerance is not a boolean. Meaning it have many values. The higher you set the tolerance the more difference it will look for. Without actually testing your script i'm not positive whats happening but for tolerance to be effective you need a large number such as 20. I've had to have a tolerance of 50 at one point. So it all depends. If this doesn't help i'll look at it further

    Ransom

  6. #6
    Join Date
    Aug 2006
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    did u read edit with the benmouse errors do u think by any chance my mouse click is outdated cause im just using 1 i learned from tuts never bothered to look through SRL core for a procedure

  7. #7
    Join Date
    Jul 2006
    Location
    NY
    Posts
    371
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I PM'ed you the script at Mopar, check that out it should have no problems. and work pretty well. I didnt test it so anything else you have to ask just do so.
    READ THE WHOLE SCRIPT!!!
    I have added alot of very little important things, I put notes here and there, and other things so just make sure you look at it very carefully.
    ~jR

  8. #8
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    One way to stop the mouse from moving to the top left is to make the mouse movement dependent on finding the color. Right now you search for a color. Then you move the mouse no matter whether you found the color or didn't find the color.

    If you made it all conditional on first finding the color by using an if... then statement it would stop that from happening.

    Code:
    procedure cuttree;
    begin
      repeat
        if findcolorspiraltolerance(x,y,treecolor,3,3,515,336,10) then
        begin
          mmouse(x,y,3,3);
          if istextat2(9,9,treetocut,20) then 
          begin
            mouse(x,y,2,2,true);
            TreesCut :=TreesCut+1;
          end;
        end;
        wait(treewait+random(500));
      until(Invfull);
    end;
    Anytime you want to run two or more commands after an if... then statement, you need to collect them together in a begin... end grouping.

    IF you find the color, you want to move the mouse and check the text. Then IF the text matches, you want to click the mouse and add 1 to your tree count.

    I also changed FindColor to FindColorTolerance. It still may not work based on the colors you are using, but hopefully it will help you understand how to organize a script.

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. Error: Cannot Fix Script - Error Overgrowth - Begin Headdesking
    By PhantasmalScripter in forum OSR Help
    Replies: 6
    Last Post: 12-23-2006, 12:50 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
  •