Dampire
Member
|
Achievements, etc...
I will try realize achievements saving, but failed. What's wrong?
Code:
Bool Achievements::save(Str name)
{
File f;
f<<best_time<<best_rating;
f.write(name);
return true;
}
Bool Achievements::load(Str name)
{
File f;
f.read(name);
f>>best_time>>best_rating;
return true;
}
void Achievements::update()
{
if(Kb.bp(KB_L))
{
T.best_time= 10;
T.best_rating=50;
T.save("achiev");
}
if(Kb.bp(KB_K))
{
T.load("achiev");
}
}
|
|
12-09-2010 01:25 PM |
|
Esenthel
Administrator
|
RE: Achievements, etc...
File f;
f.write(name);
f<<best_time<<best_rating;
|
|
12-09-2010 01:40 PM |
|
Dampire
Member
|
RE: Achievements, etc...
Thanks)
|
|
12-09-2010 04:29 PM |
|