View Single Post
  #6  
Old 01-23-2004, 11:29 AM
screamingogre
Fire Beetle
 
Join Date: Jan 2004
Posts: 9
Default Code fix for ZoneID issue

This is the fix I made to get rid of the ZoneID =0 error.

Add this to the Client.cpp file for the world compile. Under case OP_EnterWorld: // Enter world.

Replace the Current call "charid = database.GetCharacterInfo(char_name, &tmpaccid, &zoneID);" with this


Code:
long LOCounter;
			do {
			    charid = database.GetCharacterInfo(char_name, &tmpaccid, &zoneID);
				LOCounter++;
			}while ((zoneID == 0) && (LOCounter > 10000));
This will call the database until the ZoneID is not equal to 0 or the counter hits 10001. You may need to tweek the counter number for your server depending on how fast or slow it is.

**SO
Reply With Quote