Results 1 to 4 of 4

Thread: Players[CurrentPlayer].Worked not working??

  1. #1
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Players[CurrentPlayer].Worked not working??

    So, im just tweaking my Draynor Netter right now. (Almost ready for release!) And i wrote the progress report today, however, Players[CurrentPlayer].Worked and Players[i].Worked ALWAYS return 0. No matter what. So, here's my progress report code, i dont know what you can tell from it, but im pretty sure the usage is correct.. There isnt another way to use it is there?

    SCAR Code:
    Procedure ProgressReport(ForceProgress: Boolean);
    Var
      i: Integer;
      TempExp, TempLoads: Extended;
      A: String;
    Begin
      If (GetSystemTime - Report2 >= PrintReport * 60000) or (ForceProgress) then
      Begin
        DoomDebug('Progress Report');
        For i := 0 to (HowManyPlayers-1) do
          TempLoads := TempLoads + Players[i].Extendeds[2];
        For i := 0 to (HowManyPlayers-1) do
          TempExp := (TempExp + (ShrimpExp * Players[i].Extendeds[0] + AnchovyEXP * Players[i].Extendeds[1]));
        Writeln('<---------------------------------------------->');
        Writeln('¦     Draynor Netter Ver '+VerNumber+' By Itschris917    ¦');
        Writeln('<---------------------------------------------->');
        Writeln('  Total Running Time    : ' +TimeRunning);
        Writeln('  Total Loads Done      : ' +FloatToStr(TempLoads));
        Writeln('  Total Exp Gained      : ' +FloatToStr(TempExp));
        Writeln('<---------------------------------------------->');
        Writeln('  Current Player No.    : ' +IntToStr(CurrentPlayer+1)+ '/' +IntToStr(HowManyPlayers));
        Writeln('  Current Player Name   : ' +Players[CurrentPlayer].Name);
        Writeln('  Player Running Time   : ' +IntToStr(Players[CurrentPlayer].Worked)+ ' Minutes');
        Writeln('  Current Player Loads  : ' +FloatToStr(Players[CurrentPlayer].Extendeds[2]));
        If (LoggedIn) then
        begin
          Writeln('  Fishing Levels Gained : ' +IntToStr(GetSkillLevel('fishing')-Players[CurrentPlayer].Level[17]));
        end;
        Writeln('  Exp Approx Gained     : ' +FloatToStr(ShrimpExp * Players[CurrentPlayer].Extendeds[0] + AnchovyEXP * Players[CurrentPlayer].Extendeds[1]));
        Writeln('  Player Worked for     : '+IntToStr(Players[CurrentPlayer].Worked)+' Minutes');
        Writeln('  Player Currently      : '+Players[CurrentPlayer].loc);
        Writeln('<---------------------------------------------->');
        for i := 0 to HowManyPlayers-1 do
        begin
        if Players[i].Active=True then A:='True' else A:='False';
          writeln( (inttostr(i))+' : '+Players[i].name+ ' = '+A
          +'. - Lvl: '+inttostr(Players[i].Level[17])
          +'. - W: '+intToStr(Players[i].Worked)+' mins.'
          +' - Shrimp: '+floatToStr(Players[i].Extendeds[0])
          +' - Anchovies: '+floatToStr(Players[i].Extendeds[1])
          +'. - Loads: '+floatToStr(Players[i].Extendeds[2])
          +'. - Loc: '+Players[i].loc);
        end;
        Writeln('<---------------------------------------------->');
        SRLStatsRep;
        End;
        Report2 := GetSystemTime;
        GameTab(4);
    end;

  2. #2
    Join Date
    Jul 2007
    Location
    America
    Posts
    421
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm not very familiar with .worked, but it probably has something to do with the new SRL 4 Beta. I think they took out alot of things. Maybe trying using marks or something instead?
    I dunno, those asians are pretty difficult to out-auto, legend has it they don't need sleep or food...~tim0suprem0
    Activity is on the decline - school's got me
    Check out my tutorial[s] on Color Finding!||Procedures and Functions!

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

    Default

    A value is only assigned to 'players.worked' when you call NextPlayer which logs in a new player. That means it will be a zero until the currently player gets lost or something and the script switches characters.

  4. #4
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ahh, nice catch ZephyrsFury.

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
  •