View Single Post
  #1  
Old 05-02-2004, 04:24 PM
ritojo
Fire Beetle
 
Join Date: Nov 2002
Posts: 24
Default character creation

When i try to create a character i get through the creation process but the character doesnt show up. I think i got to the part of the code where the error is happening but i dont know what to do with this. It in client.cpp

Code:
case OP_CharacterCreate: //Char create
		{
			if (GetAccountID() == 0)
			{
				cerr << "Account ID not set; unable to create character." << endl;
				ret = false;
				break;
			}
			else if (app->size != sizeof(CharCreate_Struct))
			{
				cout << "Wrong size on OP_CharacterCreate. Got: " << app->size << ", Expected: " << sizeof(CharCreate_Struct) << endl;
				DumpPacket(app);
				break;
			}

			CharCreate_Struct *cc = (CharCreate_Struct*)app->pBuffer;
			if(OPCharCreate(cc) == false)
			{
				database.DeleteCharacter(cc->name);
				APPLAYER *outapp = new APPLAYER(OP_ApproveName, 1);
				outapp->pBuffer[0] = 0;
				QueuePacket(outapp);
				safe_delete(outapp);
			}

			SendCharInfo();

			break;