Error setting character titles

Old bugs stored here for reference.
Locked
User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Error setting character titles

Post by John Adams » Fri Aug 12, 2011 8:05 am

Zcoretri,

There's an error in the world log when a player loads their character. Seems the old field names are still in place for setting character titles. I didn't want to fix this without showing you, since you may just have uncommitted changes still checked out.

Error:
03:22 E DBCore: #1054: Unknown column 'prefix_title' in 'field list'

Cause (in client.cpp, SendCharInfo()):

Code: Select all

database.SetCharacterTitles(this);

Function:

Code: Select all

void WorldDatabase::SetCharacterTitles(Client* client){
	if(!client)
		return;
	Query query;
	MYSQL_RES* result = query.RunQuery2(Q_SELECT, "SELECT prefix_title, suffix_title, sub_title FROM character_titles where char_id=%i", client->GetCharacterID());
	if(result && mysql_num_rows(result) > 0) {
		MYSQL_ROW row;
		row = mysql_fetch_row(result);
		strcpy(client->GetPlayer()->appearance.prefix_title, row[0]);
		strcpy(client->GetPlayer()->appearance.suffix_title, row[1]);
		strcpy(client->GetPlayer()->appearance.sub_title, row[2]);
	}
}
Is this an obsolete function? Maybe we just need to remove it.

User avatar
Zcoretri
Team Member
Posts: 1642
Joined: Fri Jul 27, 2007 12:55 pm
Location: SoCal

Re: Error setting character titles

Post by Zcoretri » Fri Aug 12, 2011 9:45 am

Yes that is an obsolete function. I did not know that was there :shock:

But I saw the same error popping up in console and fixed it the other day, but have not committed it yet because of your post that said not to commit :mrgreen:

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Error setting character titles

Post by John Adams » Fri Aug 12, 2011 9:46 am

You should be safe to commit for now. Just do an Update to your local workspace so you can see all the conflicts I created :)

Sorry, meant to say that commit is cool. go for it.

Locked

Who is online

Users browsing this forum: No registered users and 0 guests