Getting 5.7 - DR2 working
For those of you out htere who are having problems with character creation, I got mine working earlier today by doing the following:
Starting with the 5/1/04 files, some editing will need to be done in .\common\database.cpp. First make sure that all instances of 'result' are initialized to 0. I did this with a find and replace of 'MYSQL_RES *result;' with 'MYSQL_RES *result = NULL;'
Then, also in database.cpp in the function
Database::GetStartZone(), the make the following change. This bit of code...
if((rows = mysql_num_rows(result)) == 1)
row = mysql_fetch_row(result);
if(result) mysql_free_result(result);
...needs to be conditional upon result != NULL, like this:
if(result)
{
if((rows = mysql_num_rows(result)) == 1)
row = mysql_fetch_row(result);
if(result) mysql_free_result(result);
}
Aside from that. There was one instance of the pointer 'query' not being initialized before use. Make sure anything that looks like 'char *query;' becomes 'char *query = 0;'.
After making those changes my server works fine, character creation and all.
Good luck.
-Gyre
__________________
I am Omnivore - the all devouring!
|