BFStats stopped working after year rolled over to 2020

Post Reply
User avatar
jrivett
Posts: 17
Joined: Sat Nov 26, 2011 8:03 pm
Location: Vancouver, Canada
Contact:

BFStats stopped working after year rolled over to 2020

Post by jrivett »

Earlier this year I had to switch my BF1942 server stats from select(bf) to BFStats, mostly because of obsolete PHP code in select(bf). BFStats has been working fine since then.

This morning I was looking at rolling over my server stats for the new year and noticed that all of the rounds played in 2020 were generating errors when processed by BFStats. The errors look like this:

Code: Select all

Error (java.lang.NumberFormatException: For input string: ""Tanks'nPlanes Unlimited CO-OP"") parsing line (entry will be ignored): 2020-01-01,04:01:43,"Tanks'nPlanes Unlimited CO-OP",el alamein,coop,1,-1,285,0
On a hunch, I changed the year in one of the round records in the statistics.csv input file, from 2020 to 2019. BFStats processed that round normally.

I don't know if there's anything special about the number 2020 in Java, or if we're just running into an arbitrary limit in the code.

Either way, it may be worth trying to patch the Java code, as I think there are still a few people using BFStats.
User avatar
buschhans
Posts: 338
Joined: Wed Jul 18, 2012 12:50 pm

Re: BFStats stopped working after year rolled over to 2020

Post by buschhans »

Indeed. Would be nice if the bf stats works again. Stats are for new players more important than in the past. Soon I have to create a news about it, but for that it have to work.
If do you like the BF 1942 Mods or search a Download please visit: http://hg-clan.blogspot.de/
Grabbi
Posts: 42
Joined: Wed Aug 03, 2011 3:37 pm
Location: Germany
Contact:

Re: BFStats stopped working after year rolled over to 2020

Post by Grabbi »

of couse there s a solution to this "easy" problem !


Check it out here how to solve it.
http://85.214.226.169/forum/index.php?page=BFStats

Running Version in 2020 is here:

http://85.214.226.169/serverstats/PFC/php/index2.php


and query to same problem already mentioned in this forum his here:
http://bfmods.com/viewtopic.php?f=54&t=18077


Best regards


Grabbi
[url=bf1942://85.214.226.169:14567]Image[/url]
Post Reply