Results 1 to 17 of 17

Thread: Multiple errors

  1. #1
    Join Date
    Mar 2008
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Multiple errors

    ok so Im making a script here and its done, but now Im getting errors

    This is the part Im getting errors in:

    Code:
    procedure checkcolors();
    var
    retx, rety:integer;
    chek:boolean;
    begin
         if FindColor(retx, rety, 4079166, 500, 130, 650, 100) Then
       begin
        ClickMouse(645, 70, True);
        wait(2000);
         chek := false;
              end
        else if FindColor(retx, rety, 4079166, 500, 130, 650, 100) Then
       begin
         ClickMouse(645, 70, True);
         wait(2000);
         chek := false;
              end
        else if FindColor(retx, rety, 4079166, 500, 130, 650, 100) Then
        begin
        ClickMouse(645, 70, True);
        wait(2000);
        chek := false;
        end else
        begin
        chek := true;
        end;
        if (chek = true) then
        begin
        repeat
    I get the error: [Runtime Error] : Exception: Canvas does not allow drawing in line 17 in script

    If I remove line 17 *comment it out* then I get

    Line 23: [Error] (23:1): Identifier expected in script

    But I think thats just because I remoed line 17

    Any suggestions?

  2. #2
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    I see...had this problem before..u are gunna have to redownload SRL..

  3. #3
    Join Date
    Mar 2008
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I tried that and I still recieve the same error

  4. #4
    Join Date
    Sep 2007
    Posts
    415
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hmm..well apart from it being unfinished, it compiles fine..see if this works for you(btw, those standards are crazy)

    SCAR Code:
    program new;

    procedure checkcolors;
    var
    retx, rety:integer;
    chek:boolean;
    begin
      if FindColor(retx, rety, 4079166, 500, 130, 650, 100) Then
      begin
        ClickMouse(645, 70, True);
        wait(2000);
        chek := false;
      end else
        if FindColor(retx, rety, 4079166, 500, 130, 650, 100) Then
        begin
         ClickMouse(645, 70, True);
         wait(2000);
         chek := false;
        end else
          if FindColor(retx, rety, 4079166, 500, 130, 650, 100) Then
          begin
            ClickMouse(645, 70, True);
            wait(2000);
            chek := false;
          end else chek := true;
      if (chek = true) then
      begin
        repeat
        until(false);
      end;
    end;

    begin
    end.

    if it doesn't compile, probably smoething you need to redownload SCAR for
    Quote Originally Posted by That guy that wrote forefeathers
    <munklez>haha im too lazy, girls annoy me
    <munklez> they always wanna like, do stuff
    <munklez> and i just wanna program
    <munklez> and they always take all my money

  5. #5
    Join Date
    Mar 2008
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well it WAS compiling fine, but now it isnt, Ill re-download SCAR and give an update when I do

    Ok, still having the same issues... this is the whole code now with the fixed code put in:

    Code:
    program New;
    procedure revive();
    begin
         ClickMouse(820, 160, True);
             wait(2000);
                  ClickMouse(370, 205, True);
             wait(2000);
              ClickMouse(820, 135, True);
             wait(2000);
    end;
    
    procedure checkcolors;
    var
    retx, rety:integer;
    chek:boolean;
    begin
      if FindColor(retx, rety, 4079166, 500, 130, 650, 100) Then
      begin
        ClickMouse(645, 70, True);
        wait(2000);
        chek := false;
      end else
        if FindColor(retx, rety, 4079166, 500, 130, 650, 100) Then
        begin
         ClickMouse(645, 70, True);
         wait(2000);
         chek := false;
        end else
          if FindColor(retx, rety, 4079166, 500, 130, 650, 100) Then
          begin
            ClickMouse(645, 70, True);
            wait(2000);
            chek := false;
          end else chek := true;
      if (chek = true) then
      begin
        repeat
        until(false);
      end;
        begin
        repeat
    
    ClickMouse(540, 95, True);  // cast spell
    //ClickMouse(390, 95, True);  // use weapon
    wait(950);
    
    ClickMouse(284, 175, True);
    wait(10);
    ClickMouse(284, 165, True);
     wait(10);
    ClickMouse(284, 195, True);   // wisdom
      wait(10);
    //ClickMouse(310, 165, True);
    //wait(10);
    //ClickMouse(310, 175, True);
    //wait(10);
    //ClickMouse(310, 195, True);  // Vitality
    
    //ClickMouse(245, 165, True);
    //wait(10);
    //ClickMouse(245, 175, True);
    //wait(10);
    //ClickMouse(245, 195, True);  // Intelligence
    wait(1030);
         if FindColor(retx, rety, 1135869, 575, 245, 770, 260) Then
       begin
       revive();
              end;
    until(false); //If the value here is 'false' actions repeat forever
        end;
        
    end;
    procedure mainloop();
    begin
    checkcolors();
    end;
    begin
    mainloop();
    end.
    I still get the same error on line 17

  6. #6
    Join Date
    Mar 2008
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Any other suggestions?

  7. #7
    Join Date
    Mar 2008
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I know bumping and triple posting is bad, but I figured it was better than a duplicate thread....ANYONE have any ideas? Ive tried everything I can think of and it just doesnt work

  8. #8
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    Successfully compiled

    ---

    Its your SCAR/SRL version maybe?
    Jus' Lurkin'

  9. #9
    Join Date
    Mar 2008
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Where can I get older versions?

    I compile find, its just that draw error

  10. #10
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    is this for WOW? lol

    older versions of what? they are on scar website, or in the repository thingy for scar
    ~ Metagen

  11. #11
    Join Date
    Nov 2007
    Location
    The Netherlands
    Posts
    1,490
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    don't use clickmouse.. you mouse..
    clickmouse is very detectable..
    use srl functions

  12. #12
    Join Date
    Mar 2008
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Im not using it for WoW or Runescape, clickmouse if fine fr what Im doing

    Ok, Downloaded an older version and tried with it, and it couldnt even compile right, so 3.15 is ok, but Im still getting the draw error.... I just want it to restart the script if it finds certain colors in a certain box, and it wont let me lol

  13. #13
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    niels says:

    ⁿiεls says:
    he's searching wrong
    ⁿiεls says:
    if FindColor(retx, rety, 4079166, 500, 130, 650, 100) Then
    ⁿiεls says:
    y1 and y2 are switched
    its nielsie95 who solved it.

  14. #14
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    Your searching is wrong:

    SCAR Code:
    if FindColor(retx, rety, 4079166, 500, 130, 650, 100) Then

    You're searching upside-down; the 130 is bigger than 100: try to switch those.
    Hup Holland Hup!

  15. #15
    Join Date
    Mar 2008
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I switched em and Im still getting the same error...

    [Runtime Error] : Exception: Canvas does not allow drawing in line 9 in script

    I removed part of the top, line 17 is now line 9...the beginning was unneeded

  16. #16
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    You need to switch the other ones around as well (you have 3 FindColor's and have only swapped the one set of y1 and y2 co-ords)
    I noticed the backward y co-ords 1st time - I don't know why only Nielsie spotted the error!
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  17. #17
    Join Date
    Mar 2008
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I did, I switched them all around, and the error is still there

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Multiple PC on 1 IP
    By ron1337 in forum News and General
    Replies: 6
    Last Post: 11-01-2008, 11:13 PM
  2. Multiple commands?
    By ratchetfin in forum OSR Help
    Replies: 4
    Last Post: 05-02-2008, 01:29 PM
  3. Multiple logging in w/o VM
    By loopa in forum RuneScape News and General
    Replies: 9
    Last Post: 01-03-2008, 05:40 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
  •