Adpercounter.Calculate Access Violation

General
robert83a1
2011-07-24
2013-05-14
  • robert83a1

    robert83a1 - 2011-07-24

    Hello Everyone, Just started playing with Andorra, following the tutorials step by step… and I got stuck here :

       if AdDraw.CanDraw then // Only continue, if drawing is possible
       begin

        AdPerCounter.Calculate;

        AdDraw.ClearSurface(clBlack); // Fill the surface with black color

        AdDraw.BeginScene;
        AdImageList.Find('BackGround').Draw(AdDraw,0,0,0);

        AdDraw.EndScene;

        AdDraw.Flip; // Draws you result on the screen. Otherwise, you would not see anything
       end;
      
      Done := false; // Important, otherwise the function will not be called in every loop
    end;

    If I run it step by step I get Access Violation here :

    procedure TAdPerformanceCounter.Calculate;
    var
      tc, td: double;
    begin
      //Calculate time difference
      tc := GetTickCount;
    ->  td := tc - FLastTickCount; <- Problem surfaces here in AdPerformanceCounter.pas

    Can someone help me solve this ?

    Thank you!

    Rob

     
  • robert83a1

    robert83a1 - 2011-07-24

    Solved it :

      AdPerCounter := TAdPerformanceCounter.Create;

    Added this onCreate…

     
  • Alexandr

    Alexandr - 2011-12-30

    Think You, I have the same error!
    (my english is bad because i'm from RUSSIA!)

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks