Results 1 to 5 of 5

Thread: Canvas Does not allow Drawing???

  1. #1
    Join Date
    Nov 2007
    Location
    Nowhereville
    Posts
    1,155
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default Canvas Does not allow Drawing???

    SCAR Code:
    function AmountOfRunes(WhatIndex: integer): integer;
    var
      ThePoint: TPoint;
      a, b: integer;
      Box: TBox;
    begin
      if not LoggedIn then Exit;
      if not GetCurrentTab = 5 then
        GameTab(5);
      GetInvItemBounds(WhatIndex, Box);
      if FindColorSpiralTolerance(a, b, 10987695, Box.x1, Box.y1, Box.x2, Box.y2, 5) then
      begin
        ThePoint := ItemCoords(WhatIndex);
        Result := GetAmount(ThePoint.x, ThePoint.y);
        Exit;
      end;
      Writeln('That index contains no runes.');
    end;

    So here is my function.

    Then I get...

    Code:
    [Runtime Error] : Exception: Canvas does not allow drawing in line 119 in script C:\Program Files\SCAR 3.22\Includes\SRL\SRL\Core\Amount.scar
    Sometimes when i restart scar it works once, but then it fails again! Please help.
    Formerly known as Cut em2 it

  2. #2
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Gotta set the coords for " Box: TBox;" ? I think is the problem.

    Edit: Make sure you drag the crosshiar to the client. Also, do Client Tab> Reset Specified Window, and THEN drag crosshair.
    Last edited by YoHoJo; 11-25-2009 at 12:40 AM.

  3. #3
    Join Date
    Nov 2007
    Location
    Nowhereville
    Posts
    1,155
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    thanks, that fixed it.
    Last edited by Raskolnikov; 11-25-2009 at 12:43 AM.
    Formerly known as Cut em2 it

  4. #4
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    please tell me your not creating an aircrafter, there are going to be like 3 out then

  5. #5
    Join Date
    Nov 2007
    Location
    Nowhereville
    Posts
    1,155
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Blumblebee View Post
    please tell me your not creating an aircrafter, there are going to be like 3 out then
    Nope, I'm doing the scripting competition.
    Formerly known as Cut em2 it

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
  •