About Store Forum Documentation Contact



Post Reply 
Achievements, etc...
Author Message
Dampire Offline
Member

Post: #1
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
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Achievements, etc...
File f;
f.write(name);
f<<best_time<<best_rating;
12-09-2010 01:40 PM
Find all posts by this user Quote this message in a reply
Dampire Offline
Member

Post: #3
RE: Achievements, etc...
Thanks)
12-09-2010 04:29 PM
Find all posts by this user Quote this message in a reply
Post Reply