[FIXED] Player Chars get sometimes deleted

Here we stuff all the bugs we've managed to squash/squish/squelch.
Locked
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Player Chars get sometimes deleted

Post by Grimson »

I recently noticed that after using the 'travel command my player char gets sometimes deleted when I'm logged out and a worldsave occurs. I think that happens since the last changes to region handling.
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Quite likely happening because of the lack of brackets around the #ifdefs in ChangeRegion.
Scott
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

giwo wrote:Quite likely happening because of the lack of brackets around the #ifdefs in ChangeRegion.
I'm using release builds, so those ifdefs shouldn't affect anything.
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

Way to reproduce it:

1. travel to britain - center
2. travel to green acres and walk a few steps.
3. travel back to britain - center.
4. shut the server down and start it back up.

This way my admin char get's deleted almost all the time.
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

No, you are using release builds so those ifdefs are causing the problem. Think about it, without the information in the ifdefs, the next thing below the if( Remove() ) statement is the if( Add ). So it's nesting the Add inside the remove, thus it only adds you if it CAN'T find you in the previous region. :P

I use debug 99% of the time which is why I didn't notice, in debug those statements work fine because of the #ifdef'd code.
Scott
Grimson
Developer
Posts: 802
Joined: Sat Jun 04, 2005 1:52 am
Location: Germany
Has thanked: 0
Been thanked: 0

Post by Grimson »

giwo wrote:No, you are using release builds so those ifdefs are causing the problem. Think about it, without the information in the ifdefs, the next thing below the if( Remove() ) statement is the if( Add ). So it's nesting the Add inside the remove, thus it only adds you if it CAN'T find you in the previous region. :P
I see.
giwo wrote:I use debug 99% of the time which is why I didn't notice, in debug those statements work fine because of the #ifdef'd code.
Then it's good that I use release most of the time ;).
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

*nod* Use of various different compilers helps as well, as sometimes one compiler pukes on a statement where another one has no problem.
Scott
Locked