Page 1 of 1

BFStats stopped working after year rolled over to 2020

PostPosted: Thu Jan 02, 2020 4:21 am
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.

Re: BFStats stopped working after year rolled over to 2020

PostPosted: Mon Jan 06, 2020 12:09 pm
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.

Re: BFStats stopped working after year rolled over to 2020

PostPosted: Thu Feb 06, 2020 1:01 am
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:
viewtopic.php?f=54&t=18077


Best regards


Grabbi