Results 1 to 12 of 12

Thread: Canvas Drawing Error

  1. #1
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default Canvas Drawing Error

    Well, here I am asking for help again.. I'm getting a weird error. The line it points to is in an ACA function.

    arC := GetColors(arP);

    Is line 522 of my script.

    Here are the surrounding lines of code

    SCAR Code:
    arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);

    And the error I'm getting is this:
    [Runtime Error] : Exception: Canvas does not allow drawing in line 522 in script
    So I sortof need help. As far as I know, Autocoloring does not require canvas drawing, so... I need some help.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  2. #2
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    Maybe you'r trying to get colors outside the canvas(client)

  3. #3
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    It uses smart, so it shouldnt be? I will add a check if that's whats causing it.

    Edit: Except I have no idea how to do it, because getcolors is an srl/scar function..

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  4. #4
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    wait, are you trying to auto-color by debugging SMART? as in painting all pixels that have said color with some other color?
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  5. #5
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Nope. Its simply using GetColors to find the colors in the middle of the function. It's straight from ACA.

    Here is my modified version..

    SCAR Code:
    FindColorsSpiralTolerance(650, 140, arP, 3042671, MMX1, MMY1, MMX2, MMY2, 10);
      if (Length(arP) = 0) then
      begin
        Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;
      h := High(arP);
      for i := 0 to H do
        If rs_OnMinimap(arP[i].x,arP[i].y) then
        begin
         arC[n] := GetColor(arP[i].x, arP[i].y);
         Inc(n);
        end;
      ClearSameIntegers(arC);
      arL := High(arC);

      for i := 0 to arL do

    just the middle part is all that's important. It's pretty simple... so it shouldnt mess up.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  6. #6
    Join Date
    Feb 2009
    Location
    Hungary (GMT + 1)
    Posts
    1,774
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ActivateClient;

    When I got that problem I activated the client and the error disappeared.
    I may just got luck but maybe you will got too with this.

    EDIT:Or I just targeted the client again with the cross-hair? I can't remember now.
    But something to do with those. As caused mentioned.
    Last edited by Sabzi; 08-16-2009 at 08:17 AM.

  7. #7
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by Sabzi View Post
    ActivateClient;

    When I got that problem I activated the client and the error disappeared.
    I may just got luck but maybe you will got too with this.

    EDIT:Or I just targeted the client again with the cross-hair? I can't remember now.
    But something to do with those. As caused mentioned.
    But smart doesn't benefit with either of those, does it?

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  8. #8
    Join Date
    Feb 2009
    Location
    Hungary (GMT + 1)
    Posts
    1,774
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    But smart doesn't benefit with either of those, does it?
    I don't know SMART that much. I got that error with SMART and without too. It rarely happens with SMART for me but last time it happened all the time without SMART(I was just testing a TPA). And then I made it working with something I mentioned above. Not sure with which though.

    But I think you can use ActivateClient on SMART too. The cross-hairing seems useless with that.

  9. #9
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    I'll just add an Activate client at the beginning of the script?

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  10. #10
    Join Date
    Feb 2009
    Location
    Hungary (GMT + 1)
    Posts
    1,774
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by 3Garrett3 View Post
    I'll just add an Activate client at the beginning of the script?
    I would try adding it before the function you got the error with. I did not try it with SMART. So everything can happen XD

    EDIT: After Methods post we learned that not everything can happen but nothing. So anyone out there knows the solution for the error? Because I have that too sometimes. And it seems that my "solution" was just pure luck.
    Last edited by Sabzi; 08-16-2009 at 08:37 AM.

  11. #11
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by Sabzi View Post
    I would try adding it before the function you got the error with. I did not try it with SMART. So everything can happen XD
    If you look in Smart.scar, ActivateClient is overridden and has no functionality.
    :-)

  12. #12
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Quote Originally Posted by Sabzi View Post
    I would try adding it before the function you got the error with. I did not try it with SMART. So everything can happen XD

    EDIT: After Methods post we learned that not everything can happen but nothing. So anyone out there knows the solution for the error? Because I have that too sometimes. And it seems that my "solution" was just pure luck.
    Maybe it's that the error was pure luck?

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •