For a long time now, i have been using a 'debugmode' setting in my evo server.
I use it all over the place. I use a custom gm command /debugmode to toggle it on and off then get readbacks from all kinds of stuff in the code while logged into the game.
It all works perfectly and has done for ages.
This is where it gets weird.
I decided to transplant the system into osProse to help debug some stuff.
I just put in a limited amount of code, compiled it and entered the server.
Or rather I tried to enter the server.
Immediately after selecting my character it disconnected me.
Server logs show that my character loaded in from the database with a zero length string "" for her name. User id number, password and account name came over perfectly. Just the character name failed to load from the database.
I backtracked all the stuff i had added, commenting each part out as i went and recompiling at each stage.
It finally came down to this line in Player.h
class CPlayer: public CCharacter
{
public:
CPlayer( CClientSocket* );
~CPlayer( );
//
CClientSocket* client;
bool questdebug;// Show Quest message in console?
bool codedebug; // Shows debug messages as server whispers.
bool Saved;// already save this player?(used ondisconnect/returnchar)
bool isInvisibleMode;
If i comment it out then all works perfectly but as soon as i add this boolean variable to the structure, it fails to load my character names.
I tried loads of different names for this variable and none of them work.
Any variable in this place kills the whole damn server.
What the hell is going on???
This has to be one of the most bizarre failures i have ever seen. There just doesn't seem to be any valid reason for it to fail.
I'm gonna try the whole thing with my boolean in a different structure. I might try putting it in Session or something.