Results 1 to 6 of 6

Thread: Argh!! Runtime Error!

  1. #1
    Join Date
    Jul 2007
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Argh!! Runtime Error!

    [Runtime Error] : Exception: Canvas does not allow drawing in line 13
    script:
    SCAR Code:
    1program Distillery;//By RaptorBlaze(my first script w00t)
    2var
    3a,b,x,y,c,d,e,f: Integer;//a,b=Left piece coords, x,y=Right piece coords c,d,e,f=search area values
    4procedure moveright;
    5 begin
    6  c:=a+40;
    7  d:=b-40;
    8  e:=a+40;
    9  f:=b+40;
    10
    11   if findcolor(a,b,12645373,0,0,899,1439) then
    12    clickmouse(a,b,true);
    13     if findcolor(x,y,8829120,a,b,c,d) then
    14     begin
    15      clickmouse(x,y,true);
    16    end else
    17
    18     if findcolor(x,y,4245488,a,b,e,f) then
    19      clickmouse(x,y,true);
    20  end;
    21 begin
    22 repeat
    23  moveright
    24 wait(500+random(200))//added random for more humanity(just in case)
    25 until(iskeydown('a'));
    26 end.
    maybe when i can script without getting an error on every line i'll be less careless about leaving copies of the script for anyone to copy lol... ,also i'm thinking of adding another procedure to make it smarter after i get this part working(its a puzzle solving script)

  2. #2
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Did you select RS with the crosshair?

  3. #3
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Never got this error before...why not use Mouse instead of ClickMouse? It's not detectable.

    As for FindColor, why not use FindColorTolerance. I believe that the colours change slightly every while.
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

  4. #4
    Join Date
    Jul 2007
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What would you suggest for a tolerance value?
    ...theres no mouse command, just variations(clickmouse,holdmouse,movemouse etc.)
    W00T! it finally works! got a bit of tweaking to do though still. and need to add a reverse movement..but other than that its good thanks

  5. #5
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm not sure what you're trying to find, but 10-15 should be sufficient.
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

  6. #6
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    The reason theres not Mouse procedure is because you haven't added SRL as an include yet. Add this:
    SCAR Code:
    {.include SRL/SRL.scar}
    After the program whatever; line

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [Runtime Error] : Exception: buffer error
    By GasMan in forum OSR Help
    Replies: 11
    Last Post: 05-13-2007, 02:07 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
  •