Narcle
2007-11-22 12:49:00
For some reason my XP/hour isn't calculating right. I keeps going negative or is way to low. I think some how when I'm adding time to each person its going negative somehow but I can't figure it out.
I have it MarkTime(RoundTimer) every time I do the player setup process, so that shouldn't cause the problem… *sigh* I marked the lines with {T} and {C}
Report:
I have it MarkTime(RoundTimer) every time I do the player setup process, so that shouldn't cause the problem… *sigh* I marked the lines with {T} and {C}
if (HowManyPlayers > 1) then
begin
Players[currentplayer].Integers[11] := Players[currentplayer].Integers[11] + XPn;
Players[currentplayer].Integers[12] := Players[currentplayer].Integers[12] + killed;
Players[currentplayer].Integers[13] := Players[currentplayer].Integers[13] + CurAU;
Players[currentplayer].Integers[15] := Players[currentplayer].Integers[15] + foodate;
{T} Players[currentplayer].Integers[31] := Players[currentplayer].Integers[31] + TimeFromMark(RoundTimer);
{C} if (Players[currentplayer].Integers[11]>0) and (Players[currentplayer].Integers[31]>0) then
Players[currentplayer].Integers[32] := ((Players[currentplayer].Integers[11]*3600000)/Players[currentplayer].Integers[31]) else Players[currentplayer].Integers[32] := 0;
ClearDebug;
Writeln('|_Multi-Player__Fast Fighter v'+Version+' by Narcle___|');
Writeln('| Ran: ' + inttostr(H) + 'h:' + inttostr(M) + 'm:' + inttostr(S)+'s Current Time: '+TheTime+' Start Time: '+StartTime+' |');
WriteLn('| Totals: XP Gained; '+ inttostr(Txp)+', Kills; '+ inttostr(TKilled)+', Food ate; '+inttostr(TFoodate)+', Ammo used; '+inttostr(TArrowAmount)+' |');
writeln(' _____________________________________________________________________________________');
Writeln('| # | Nick | Active | A S D R | XP gained | Kills | XP/hour | Food ate | Ammo Used |');
For I := 0 to HowManyPlayers - 1 do
begin
if Players[i].Active=True then Active := 'True' else Active := 'False';
Writeln('| '+IntToStr(I)+' | '+Players[i].Nick+' | '+Active+' | '+IntToStr(Players[i].level[1])+' '+IntToStr(Players[i].level[2])+' '+
+IntToStr(Players[i].level[3])+' '+IntToStr(Players[i].level[4])+' | XP: '+IntToStr(Players[i].Integers[11])+' | K: '+
+IntToStr(Players[i].Integers[12])+' | XP/h: '+IntToStr(Players[i].Integers[32])+' | Ate: '+IntToStr(Players[i].Integers[15])+
+' | AU: '+IntToStr(Players[i].Integers[13])+' |');
end;
end;Report:
|_Multi-Player__Fast Fighter v2.1 by Narcle___|
| Ran: 8h:0m:59s Current Time: 12:32:01 PM Start Time: 04:31:57 AM |
| Totals: XP Gained; 17320, Kills; 1432, Food ate; 0, Ammo used; 0 |
_____________________________________________________________________________________
| # | Nick | Active | A S D R | XP gained | Kills | XP/hour | Food ate | Ammo Used |
| 0 | enc | True | 12 12 12 1 | XP: 3300 | K: 272 | XP/h: -178 | Ate: 0 | AU: 0 |
| 1 | sgi | True | 21 21 21 1 | XP: 3832 | K: 316 | XP/h: 158 | Ate: 0 | AU: 0 |
| 2 | vei | True | 19 20 19 1 | XP: 3832 | K: 318 | XP/h: 156 | Ate: 0 | AU: 0 |
| 3 | etb | True | 16 16 16 1 | XP: 2864 | K: 236 | XP/h: 341 | Ate: 0 | AU: 0
| 4 | cal | True | 21 21 0 0 | XP: 3492 | K: 290 | XP/h: -60 | Ate: 0 | AU: 0 |