Forum

> > CS2D > General > How is stats.dat encoded?
Forums overviewCS2D overviewGeneral overviewLog in to reply

English How is stats.dat encoded?

3 replies
To the start Previous 1 Next To the start

old How is stats.dat encoded?

Hajt
User Off Offline

Quote
Does anyone have any information on how the
CS2D\sys\stats\stats.dat
file is encoded? I'm trying to understand its structure for parsing purposes.

old Re: How is stats.dat encoded?

Ranu
User Off Offline

Quote
Not exactly sure how its encoded, but the structure seems to be like this:

1
2
3
4
5
6
7
8
9
10
11
Tstats_general {
    pointer decl;
    references;
    day; 
    month;
    year;
    hour; 
    up;
    down;
    players; 
};

Functions:
1
2
3
getstats()
savestats()
loadstats()

Can't guarantee the results. Also, It doesn't seem to be relevant anymore.

old Re: How is stats.dat encoded?

DC
Admin Off Offline

Quote
the exact format is:
header line "stats alpha" (written with BlitzMax WriteLine)
after that, in a loop until eof:
- byte (unsigned 8 bit) day
- byte month
- short (unsigned 16 bit) year
- byte hour
- long (signed 64 bit) uploaded bytes
- long downloaded bytes
- byte players
(all data types as explained here)
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview