Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Release] Timer.cpp fix

Status
Not open for further replies.
Junior Spellweaver
Joined
Apr 4, 2008
Messages
109
Reaction score
0
I know some people that get errors coming from Timer.cpp and this may fix it.
In Timer.cpp find
Code:
void Timer::remove(int id){
    getTimer(id)->handler->remove(id);
    for(unsigned int i=0; i<timers.size(); i++){
        if(timers[i]->id == id){
            timers.erase(timers.begin()+i);
            break;
        }
    }
}
Add under

Code:
void Timer::remove2(int id){
    getTimer(id)->handler->remove(id);
    for(unsigned int i=0; i<timers.size(); i++){
        if(timers[i-1]->id == id){
            timers.erase(timers.begin()+i);
            break;
        }
    }
}
Save and exit.

Open Timer.h

Find
Code:
void remove(int id);

Add

Code:
void remove2(int id);

Then rebuild.
Should have no errors.

This has been tested and server has been running 5 hours without crashes!:eek:

Credits to me!
 
Last edited:
Delta
Loyal Member
Joined
Apr 4, 2008
Messages
951
Reaction score
305
wow THANK YOU!!! wait. So does this fix as well that whole error 38 thing? when there's to many players on the map and you dc and get that error?
 
Newbie Spellweaver
Joined
Aug 10, 2006
Messages
83
Reaction score
0
What does this fix exactly my random server crashes every 4 mins.?
 
Junior Spellweaver
Joined
Apr 4, 2008
Messages
109
Reaction score
0
wow THANK YOU!!! wait. So does this fix as well that whole error 38 thing? when there's to many players on the map and you dc and get that error?

I'm not sure. I have never gotten error 38 before..

@Derek3771
I forgot what types of crash errors but this fixed mostly all my crashes.:juggle:
 
Newbie Spellweaver
Joined
Apr 13, 2008
Messages
9
Reaction score
0
Hmm.. so you're not sure what this fixes but it fixes something? o.o
I'll try it out and get back to you.
 
Junior Spellweaver
Joined
Apr 4, 2008
Messages
109
Reaction score
0
So does anyone have good comments or bad? :(
I still waiting
 
Newbie Spellweaver
Joined
Mar 30, 2008
Messages
20
Reaction score
0
Nice release as always.
If you can work on the line 242 error :O
The most common error that happens if my server :p
 
Junior Spellweaver
Joined
Apr 12, 2008
Messages
103
Reaction score
0
After adding this, my characer fucked up. Click on him, DC. Not even an EoF error 38.
 
Junior Spellweaver
Joined
Apr 4, 2008
Messages
109
Reaction score
0
@iFate did you check you DB if your not in map 99999999 or some invalid map?
It works fine for me and my players.
Server been up for 8 hours now :D
 
Junior Spellweaver
Joined
Apr 12, 2008
Messages
103
Reaction score
0
I was chillin' in Maya's house... so it couldn't be the map?
 
Junior Spellweaver
Joined
Apr 4, 2008
Messages
109
Reaction score
0
I'm not sure try map 0 because this does not have to do this map
 
Junior Spellweaver
Joined
Apr 4, 2008
Messages
109
Reaction score
0
Well I'm kinda a C++ n00b but somehow this works for me.
With one check my server crashes and crashes at Timer.cpp
With two it does not crash :) 11 hours without any crashes
 
Junior Spellweaver
Joined
Apr 4, 2008
Messages
109
Reaction score
0
Off topic - I have about 15 players online right now(Due to DB wipe...) But later on in the day there will be more coming on :)

Please don't flame. I was just trying to help :(
 
Junior Spellweaver
Joined
Apr 9, 2008
Messages
188
Reaction score
0
Thasts why your first one should continue; to your other one -_-
 
Newbie Spellweaver
Joined
Apr 28, 2008
Messages
30
Reaction score
0
anyone can confirm if this fix works? I really need a fix for the timer crash.
 
Status
Not open for further replies.
Back
Top