Results 1 to 4 of 4

Thread: Per hour calculation, help?

  1. #1
    Join Date
    Oct 2007
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Per hour calculation, help?

    I am using the following to calculate per hour rates for different vars, but i am getting a math error for some reason.

    SCAR Code:
    var
    ExpPH, PicksPH : Integer;
    H, M, S : Integer;

    procedure HandlePHCalc;
    begin
     ConvertTime(GetTimeRunning, H, M, S);
     ExpPH := Round(ExpEarned div (H + (M/60)));
     PicksPH := Round((ArrowsPicked+NotesPicked) div (H + (M/60)));
    end;

    Could someone help me out?
    Woot woot.

  2. #2
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    EPH := Round((TotalEXP * 3600.0) / (GetTimeRunning / 1000.0));

    Exp Per Hour

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  3. #3
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    SCAR Code:
    var
    ExpPH, PicksPH : Integer;

    procedure HandlePHCalc;
    begin
     ExpPH := Round(ExpEarned / (GetTimeRunning / 3600));
     PicksPH := Round((ArrowsPicked+NotesPicked) / (GetTimeRunning / 3600));
    end;

  4. #4
    Join Date
    Oct 2007
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks a lot guys.
    Woot woot.

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
  •