Ni3ls
22nd March 2013, 14:17
Hi all,
Im trying to get more handy with the fread etc stuff to manage the scriptdata files.
In Callback_StartGameType()
level.mostkills =0;
Then in the endMap()
f=openfile("stats/bestplayers.txt","read");
if(f !=-1)
{
freadln(f);
level.mostkills = int(fgetarg(f,0));
iprintlnbold("Most kills: "+level.mostkills);
closefile(f);
}
and i made bestplayers.txt in scriptdata/stats and inside this file
10
But it keeps returning level.mostkills = 0
Im trying to get more handy with the fread etc stuff to manage the scriptdata files.
In Callback_StartGameType()
level.mostkills =0;
Then in the endMap()
f=openfile("stats/bestplayers.txt","read");
if(f !=-1)
{
freadln(f);
level.mostkills = int(fgetarg(f,0));
iprintlnbold("Most kills: "+level.mostkills);
closefile(f);
}
and i made bestplayers.txt in scriptdata/stats and inside this file
10
But it keeps returning level.mostkills = 0