Results 1 to 5 of 5

Thread: [Runtime Error] : Exception: Canvas does not allow drawing

  1. #1
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default [Runtime Error] : Exception: Canvas does not allow drawing

    I have no clue what i did wrong, well, here is a part of the script in which the error occurs:
    SCAR Code:
    Var
      sx, sy, x, y, fx1, fx2, fy1, fy2, FlagBMP, count: Integer;
    Begin
      Wait(300);
      Symbolaccuracy := 50;
      RoadColor := FindRoadColor;
      MakeCompass('N');
      LoadSymbolBitmapColor('Quest');
      fx1 := 627;
      fx2 := 661;
      fy1 := 19;
      fy2 := 49;
      If not (FindColor(sx, sy, 255, fx1, fx2, fy1, fy2)) Then // It occures here...
    Thank you for your help,
    Stur Pure
    There is nothing right in my left brain and there is nothing left in my right brain.

  2. #2
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Its because now that would try to find the color in:

    x1...x2
    y1./
    ../
    ./
    y2

    which isn't possible.

    You need to do x1, y1, x2, y2.

  3. #3
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    why wouldn't it find the color like this:
    SCAR Code:
    (fx1, fy1)==========
                |-----------|
                |-----------|
                |-----------|
                |-----------|
                ==========(fx2, fy2)

    I am sorry if i am being a complete idiot here, but I really can't see what the problem is...
    There is nothing right in my left brain and there is nothing left in my right brain.

  4. #4
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Yes, thats how you are supposed to do, the problem is that you're doing

    fx1, fx2, fy1, fy2
    instead of

    fx1, fy1, fx2, fy2

  5. #5
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    *Hits head on table*
    Well, that clears it up, thanks a lot for your help!
    EDIT: uuuuuuuuhhhhh, aaaaaahhhhhhhh, oooooohhhhhhh, my post has lots of moving colorful thingies. (okay, no one worry, I am back to normal now ) (oh, btw, that was totaly off topic)
    There is nothing right in my left brain and there is nothing left in my right brain.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 03-29-2008, 06:32 PM
  2. Replies: 9
    Last Post: 02-05-2008, 01:36 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
  •