Results 1 to 5 of 5

Thread: What have i done wrong? (SRL STATS)

  1. #1
    Join Date
    Jul 2008
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default What have i done wrong? (SRL STATS)

    Ok, I finally kinda thought I understood how to use SRL Stats

    My code:

    Beginning:
    SCAR Code:
    ClearDebug;
      ClearReport;
      SetupSRL;
      ScriptID := '913';
      if(UseSRL) then
       begin
          SRLID := YourID;
          SRLPassword := YourPass;
       end;

    Report:
    SCAR Code:
    procedure Report;
    begin
    ClearReport;
    if(UseSRL) then
    begin
      ReportVars[0] := HowManyPlayers;
      ReportVars[1] := TotalCut;
      ReportVars[2] := MyBanks;
      ReportVars[3] := Antis;
      ReportVars[4] := Players[CurrentPlayer].level[13];
      SRLRandomsReport;
    end;
    //Ln('Gathering Report');
    AddToReport('#########################');
    AddToReport('#      Pro Fletcher     #');
    AddToReport('#         v 1.2         #');
    AddToReport('#  Players: ' + intToStr(HowManyPlayers));
    AddToReport('#  Current: ' + Players[CurrentPlayer].Name);
    AddToReport('#  Running: ' + TimeRunning);
    AddToReport('#      Cut: ' + intToStr(Players[CurrentPlayer].Integers[1]));
    AddToReport('#    Total: ' + intToStr(TotalCut));
    AddToReport('#    Banks: ' + intToStr(MyBanks));
    AddToReport('# AntiBans: ' + intToStr(antis));
    AddToReport('#    Level: ' + intToStr(Players[CurrentPlayer].level[13]));
    AddToReport('#########################');

    if(TCut > 0) and (TotalCut >= TCut) then TerminateScript;
    if(SCut > 0) and (Players[CurrentPlayer].Integers[1] >= SCut) then Logout;

    end;




    My proggie (correct):
    Code:
    /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
    |     SRL 4 Randoms Report     |
    |      www.srl-forums.com      |
    |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
    | SRL Logs         :         1 |
    \~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/
    #########################
    #      Pro Fletcher     #
    #         v 1.2         #
    #  Players: 2
    #  Current: ******
    #  Running: 16 Minutes and 27 Seconds
    #      Cut: 324
    #    Total: 324
    #    Banks: 13
    # AntiBans: 26
    #    Level: 68
    #########################



    On the RL Stats page, all the vars have trippled? Look: (this is for the p[roggy above)


    Code:
    Script Statistics for Pro Fletcher  Current Version 1.2 
    Players : 6
    Total Cut : 568
    Banks : 26
    AntiBans : 48
    End Level : 204




    HELP

  2. #2
    Join Date
    Jul 2008
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Plus to have proper stat reporting you cant do.
    ReportVars[0] := Players[CurrentPlayer].Integers[1];
    ReportVars[1] := MyBanks;
    ReportVars[2] := antis;

    You have to subtract the last entry. or reset them every report...

    and for the level....
    you need to get it at startup.. then..
    ReportVars[3] := ((Players[CurrentPlayer].level[13] - "Startuplevel Var") - "Last levels gained Var");
    I don't understand it

  3. #3
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    post the whole script

  4. #4
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Plus to have proper stat reporting you cant do.
    ReportVars[0] := Players[CurrentPlayer].Integers[1];
    ReportVars[1] := MyBanks;
    ReportVars[2] := antis;
    You can do that Timer, SendSRLReport automatically subtracts the last report value and then resets it to zero. However it would be better to do this:

    SCAR Code:
    ReportVars[0] := ReportVars[0] + Players[CurrentPlayer].Integers[1];
    ReportVars[1] := ReportVars[1] + MyBanks;
    ReportVars[2] := ReportVars[2] + antis;

    Because the SendSRLReport only send it every 5 minutes there is a chance that you'll call that part more than once during that 5 minutes. So if you didn't add the previous ReportVars value to the new one, you would just override it and therefore lose your previous report values.

    And please Foss, one thread at a time please. It doesn't help if you have people posting on lots of different threads.

  5. #5
    Join Date
    Jul 2008
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. were am i going wrong in here
    By Scaper in forum OSR Help
    Replies: 3
    Last Post: 11-20-2007, 10:15 PM
  2. Replies: 8
    Last Post: 03-23-2007, 04:20 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
  •