Results 1 to 13 of 13

Thread: Having trouble using SMART_paint

  1. #1
    Join Date
    Mar 2013
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default Having trouble using SMART_paint

    trying to just do a simple

    Simba Code:
    if (findDTM(water,x,y,11,12,508,327)) then
      begin
        SMART_ClearCanvas;
        SMART_DrawBoxEx(true, intToBox(x-5,y-5,x+5,y+5), clGreen);
      end;

    but I kept getting the error

    Compiling failed.
    [Error] (26:5): Unknown identifier 'SMART_ClearCanvas' at line 25
    I figured that I didn't include the file, so I added

    Simba Code:
    {$i srl/srl/misc/paintsmart.simba}

    now I'm getting the following error within paintsmart.simba

    [Error] C:\Simba\Includes\srl/srl/misc/paintsmart.simba(44:33): Unknown identifier 'SmartGetDebugDC' at line 43
    Compiling failed.

  2. #2
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

  3. #3
    Join Date
    Mar 2013
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by Ashaman88 View Post
    Smartgraphics file not paintsmart
    then whats the file i'm supposed to include?

  4. #4
    Join Date
    Mar 2007
    Posts
    5,125
    Mentioned
    275 Post(s)
    Quoted
    901 Post(s)

    Default

    Quote Originally Posted by ookamocka View Post
    then whats the file i'm supposed to include?
    SmartGraphics.simba

    Forum account issues? Please send me a PM

  5. #5
    Join Date
    Mar 2013
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by Justin View Post
    SmartGraphics.simba
    yeah i had found it thx... but now I'm getting this error whenever I try to clear the canvas, whether it be from using the clear function or the clear parameter to true...

    Error: Exception: Access violation at line 78
    within the SmartGraphics.simba

    this is the function that's bring up an error

    Simba Code:
    procedure SMART_ClearCanvas;
    begin
      if (not SMART_DebugSetup) then
        SMART_SetupDebug;

      If (SMART_CANVAS.TransparentColorSet) then
        SMART_CANVAS.FastDrawClear(SMART_CANVAS.GetTransparentColor)
      else
        SMART_CANVAS.FastDrawClear(0);
    end;

    this is the line:

    Simba Code:
    SMART_CANVAS.FastDrawClear(0);

  6. #6
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

  7. #7
    Join Date
    Mar 2013
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Simba Code:
    program testP07;
    {$DEFINE SMART}
    {$I SRL/SRL.Simba}
    {$I P07Include.Simba}
    {$i SRL/SRL/Misc/SmartGraphics.simba}

    var
      x, y, water: integer;

    //LOGIN INFO STUFF
    procedure P07_DeclarePlayer;
    begin
      P07_PlayerName:='Name';
      P07_PlayerPass:='Pass';
    end;

    procedure loadDTM;
    begin
    water := DTMFromString('mQwAAAHicY2ZgYBBgZGAQB2IxIL7LAMGPgLhn422G5nX3GUqW3WDgB/JhmAUJAwEAXdwJMw==');
    end;

    procedure paintScreen;
    begin
      if (findDTM(water,x,y,11,12,508,327)) then
      begin
        //SMART_ClearCanvas;
        SMART_DrawBoxEx(true, true, intToBox(x-10,x+10,x-10,x+10), clRed);
      end;
    end;

    begin
      clearDebug;
      SetupSRL;
      P07_DeclarePlayer;
      SetupP07Include;
      ActivateClient;
      loadDTM;
      wait(2000);

      if (not P07_LoggedIn) then
      begin
        P07_LogInPlayer;
        P07_MakeCameraAngleHigh;
        P07_MakeCompassNorth;
      end

      else
      begin
        paintScreen;
        //checkFishingSpot;
      end;
    end.

  8. #8
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

    Default

    I'm guessing it has something to do with the navbar offsets - it works in the official OSR include

  9. #9
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by ookamocka View Post
    [simba]program testP07;
    {$DEFINE SMART}
    {$I SRL/SRL.Simba}
    {$I P07Include.Simba}
    {$i SRL/SRL/Misc/SmartGraphics.simba}

    What I would suggest is trying SMART8. Install SMART 8 and define it at the top {$DEFINE SMART8}.

  10. #10
    Join Date
    Jul 2011
    Location
    /home/litoris
    Posts
    2,226
    Mentioned
    0 Post(s)
    Quoted
    159 Post(s)

    Default

    I have the exact same problem. Once I draw something, I can't clear the canvas. Using the smartgraphics file and Smart 8.
    Miner & Urn Crafter & 07 Chicken Killer
    SPS BlindWalk Tutorial

    Working on: Nothing

    teacher in every art, brought the fire that hath proved to mortals a means to mighty ends

  11. #11
    Join Date
    Mar 2013
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by litoris View Post
    I have the exact same problem. Once I draw something, I can't clear the canvas. Using the smartgraphics file and Smart 8.
    hmm... well anyone else know what's going on here?

  12. #12
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

    Default

    Yes I tell you it's probably b/c you are using it w/ 07 and you didn't update smartgraphics for 07. Just pull the one off of the official one on github

  13. #13
    Join Date
    Mar 2013
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    added the 07 SmartGraphics... and now i'm getting this error -_-

    Exception in Script: Define not closed

    nvm, for some reason when i d/l'd SmartGraphics, all the HTML/XML tags were still there
    Last edited by ookamocka; 03-10-2013 at 06:13 PM.

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
  •