Results 1 to 6 of 6

Thread: Runtime Error? Help Me Please

  1. #1
    Join Date
    Oct 2006
    Location
    Texas
    Posts
    1,450
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default Runtime Error? Help Me Please

    Im using radial walking in one of my scripts and I get this error everytime.

    [Runtime Error] : Exception: Canvas does not allow drawing in line 511 in script C:\Program Files\SCAR 2.03\includes\srl\srl\core\MapWalk.scar

    Im using radial walking in another script to and i dont get that error.
    Whats the problem? He is the procedure too


    SCAR Code:
    procedure WalkToShop;
    begin
    If(InvCount = 28) Then
    Begin
    RadialWalk(RoadColor,184,544,54,1,-1);
    Flag;
    RadialWalk(RoadColor,219,579,52,1,-1);
    Flag;
    RadialWalk(RoadColor,239,559,541,1,-1);
    Flag;
    If(FindSymbol(x,y,'shop')) then
    begin
    Mouse(x,y,2,2,True);
    Flag;
    End;
    If(Not(FindSymbol(x,y,'shop'))) Then
    Writeln('Lost Dammit');
    Players[CurrentPlayer].Loc:= 'Lost';
    Players[CurrentPlayer].Active:= False;
    LogOut;
    nextPlayer(True);
    End;
     End;

  2. #2
    Join Date
    Sep 2006
    Posts
    154
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Did you remember to put SetupSRL in your main loop or in your setup procedure?

    Btw, why use RadialWalk when you could use RadialRoadWalk?

  3. #3
    Join Date
    Jul 2006
    Location
    NY
    Posts
    371
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    and you can also do
    SCAR Code:
    For i:= 1 To 3 Do
       Begin
       RadialRoadWalk(MyRoadColor1,20,-15,45,-1,0)
        Flag;
       Wait(random(1000))
      End;
    that will repeat itself 3 times, instead of going radialroadwalk flag radialroadwalk flag radialroadwalk flag... you know what i mean.

  4. #4
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    If you want to use same parameters each time...

  5. #5
    Join Date
    Jan 2007
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    reopen script, change view, move player pos, crosshair drag around 6 times. then try, always worked 4 me.

  6. #6
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Usually the 'Canvas does not allow drawing' error happens when you have not selected the RS window correctly, or the RS window is not active when you try to run that particular command.

    Remember that even if you drag the crosshairs to the RS window, it still may not be 'active'. I always add an ActivateClient command near the beginning of my scripts to make sure that the RS window is active. That may be the problem you are having.

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
  2. Runtime Error
    By CamHart in forum OSR Help
    Replies: 2
    Last Post: 11-23-2006, 05:21 AM
  3. Runtime error
    By sk8ter in forum OSR Help
    Replies: 3
    Last Post: 10-30-2006, 01:55 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
  •