[Help] Error

10/31/2008 22:34 Brun0_#1
Hi, I am With an ERROR In My Source, the Error is the Following one:

[Only registered and activated users can see links. Click Here To Register...]

It will be That Somebody Could Help Me?
10/31/2008 23:47 alexbigfoot#2
Quote:
Originally Posted by Rechocto View Post
so! here's how to fix it!

go into General.cs, and search for "public unsafe General()"

under that you will find "DataBase.Connect(DBUserName, DBUserPass);"

under that line add:
Code:
DataBase.Connection.StateChange += new StateChangeEventHandler(State_Changed);
then directly ABOVE "public unsafe General()" add:
Code:
        static void State_Changed(object sender, StateChangeEventArgs e)
        {
            Ini Config = new Ini(System.Windows.Forms.Application.StartupPath + @"\Config.ini");
            string DBUserName = Config.ReadValue("Server", "DBUserName");
            string DBUserPass = Config.ReadValue("Server", "DBUserPass");
            if (e.CurrentState == ConnectionState.Closed) //no need for a timer to fix login freeze?
                DataBase.Connect(DBUserName, DBUserPass);
        }
the end.
the fix.