Results 1 to 5 of 5

Thread: P07 SmartGraphics

  1. #1
    Join Date
    Feb 2013
    Location
    Narnia
    Posts
    615
    Mentioned
    8 Post(s)
    Quoted
    252 Post(s)

    Default P07 SmartGraphics

    im trying to display a paint in smart8 but i keep getting this error. i dont want to use the OSR include, only the P07 include

    Error: Exception: Access violation at line 78
    The following DTMs were not freed: [SRL - Lamp bitmap, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
    The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap, SRL - NavBar Bitmap, SRL - Options Bitmap, 5, 6, 7]

    i have {$I SRL/SRL/Misc/SmartGraphics.Simba} declared at the top

    View my OSR Script Repository!


    Botted to max
    Guides: How to Report Bugs to the Scripter
    ~~~~ Moved to Java. Currently Lurking ~~~~

  2. #2
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Why don't you want to use the OSR include... everything's faster.

    Do you have SMART enabled also? And show us your code you might be trying to draw something in correctly

  3. #3
    Join Date
    Feb 2013
    Location
    Narnia
    Posts
    615
    Mentioned
    8 Post(s)
    Quoted
    252 Post(s)

    Default

    because this is a public script, in my private script (OSR) it works where i use the OSR smartgraphics- the error i get lies in here

    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); //this is line 78
    end;

    Simba Code:
    Procedure DrawCustomPaint(st, cp, eg, tg, ca, tr, eh: string);
    var PaintPic: integer;
    begin
      SMART_ClearCanvas;
      PaintPic := BitmapFromString(516, 157, 'thebitmap');

      SMART_DrawBitmap(False, PaintPic, Point(0, 225));
      FreeBitmap(PaintPic);
      SMART_DrawText(93,264, UpChars07, 'Status: ', 14545386); //drawing the word status
      SMART_DrawText(143,264, Upchars07, st, 14545386);
      SMART_DrawText(93,304, UpChars07, 'Competitions Played: ', 14545386);  //drawing the word competitions played
      SMART_DrawText(234,304, UpChars07, cp, 14545386);
      SMART_DrawText(318,304, UpChars07, 'Exp Gained: ', 14545386);
      SMART_DrawText(397,304, UpChars07, eg, 14545386);
      SMART_DrawText(93,324, UpChars07, 'Tickets Gained: ', 14545386);
      SMART_DrawText(195,324, UpChars07, tg, 14545386);
      SMART_DrawText(93,344, UpChars07, 'Competitions Before Wielding Arrows: ', 14545386);
      SMART_DrawText(342,344, UpChars07, ca, 14545386);
      SMART_DrawText(375,354, UpChars07, ForumName, 425678)
      SMART_DrawText(93,284, UpChars07, 'Time Running: ', 14545386);
      SMART_DrawText(184,284, UpChars07, TimeRunning, 14545386);
      SMART_DrawText(318,324, UpChars07, 'Exp Per Hour: ', 14545386);
      SMART_DrawText(408,324, UpChars07, eh, 14545386);
      end;

    View my OSR Script Repository!


    Botted to max
    Guides: How to Report Bugs to the Scripter
    ~~~~ Moved to Java. Currently Lurking ~~~~

  4. #4
    Join Date
    Feb 2013
    Posts
    465
    Mentioned
    6 Post(s)
    Quoted
    221 Post(s)

    Default

    It is due to the coordinates you are drawing to the smart screen, to run smart with P07Include you need to alter 3 files, you need to alter some coordinates in smartGraphics to use graphics correctly, you should use SRL-OSR. it has the same functionality and no hacking around in core srl functions...

  5. #5
    Join Date
    Feb 2013
    Location
    Narnia
    Posts
    615
    Mentioned
    8 Post(s)
    Quoted
    252 Post(s)

    Default

    Quote Originally Posted by wthomas View Post
    It is due to the coordinates you are drawing to the smart screen, to run smart with P07Include you need to alter 3 files, you need to alter some coordinates in smartGraphics to use graphics correctly, you should use SRL-OSR. it has the same functionality and no hacking around in core srl functions...
    ugh, alright thanks mate! and yes i know, it works fine with my private script. can i atleast write text to smart8 without the bitmap and tinkering around?

    is the same true for the GetAmount? I just declared the GetAmount functions in my script but they always say the amount is 0 even though it finds the object im trying to get the amount of
    Last edited by Sk1nyNerd; 05-05-2013 at 08:27 PM.

    View my OSR Script Repository!


    Botted to max
    Guides: How to Report Bugs to the Scripter
    ~~~~ Moved to Java. Currently Lurking ~~~~

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
  •