[Problem] Create Char Job

01/27/2014 22:47 kinerzou#1
Hello,

I have try to test this system [Only registered and activated users can see links. Click Here To Register...]

it's work fine, but when i click "Ok", my character is not create (not in char selection), however the character is in the DB.

Sorry for my english !
01/29/2014 12:26 kinerzou#2
Anyone ?
01/29/2014 21:14 Lumi#3
Did you excute the query?
01/29/2014 22:02 kinerzou#4
This?
Quote:
FROM BASE_VALUE_TBL
WHERE g_nSex = @im_dwSex AND
m_nJob
I have modify the stored procedure and execute.

My DBManager.cpp

Quote:
#ifdef __JOB_CREATE_CHAR
DBQryCharacter( szQuery, "I1", 0, g_appInfo.dwSys, lpDbOverlappedPlus->AccountInfo.szAccount, lpDbOverlappedPlus->AccountInfo.szPlayer, nSlot, dwWorldID,
dwIndex, vPos.x, vPos.y, vPos.z, '\0', nSkinSet, nHairMesh, dwHairColor, nHeadMesh, nSex, 0.0f, 0, 0.0f, 0, 0, 0, 0, 0, nJob );
#else //__JOB_CREATE_CHAR
DBQryCharacter( szQuery, "I1", 0, g_appInfo.dwSys, lpDbOverlappedPlus->AccountInfo.szAccount, lpDbOverlappedPlus->AccountInfo.szPlayer, nSlot, dwWorldID,
dwIndex, vPos.x, vPos.y, vPos.z, '\0', nSkinSet, nHairMesh, dwHairColor, nHeadMesh, nSex );
#endif //__JOB_CREATE_CHAR


if( FALSE == qry->Exec( szQuery ) )
{
WriteLog( "%s, %d\r\n\t%s", __FILE__, __LINE__, szQuery );
FreeRequest( lpDbOverlappedPlus );
return;
}

#ifdef __Chogiha
// ÃʱâÈ* ÀÛ¾÷ÇÒ¶§ ¾²ÀδÙ~~~~ Æò»ó½Ã ¾È¾¸
WriteToFile(nSkinSet, nHairMesh, nSex, nJob, nHeadMesh, dwHairColor, lpDbOverlappedPlus->AccountInfo.szPlayer );
#endif

if( qry->Fetch() )
{
int nError;
u_long nidPlayer;
nError = qry->GetInt( "fError" );
if( nError == 1 )
{
nidPlayer = qry->GetInt( "m_idPlayer" );
#if __VER >= 11 // __SYS_PLAYER_DATA
PlayerData pd;
#ifdef __JOB_CREATE_CHAR
pd.data.nJob = nJob;
#else //__JOB_CREATE_CHAR
pd.nJob = 0;
#endif // __JOB_CREATE_CHAR
01/29/2014 22:39 Lumi#5
You need the base_value query too.
01/29/2014 23:14 kinerzou#6
what is the base_value query?

Oh, ok i've find it ! Thanks.
But when i execute the query, they have an error. they have a primary key on g_nSex, i can't add.
05/19/2014 15:55 marvincod1#7
Hey, do you have the v19 resdata for me? because here my client crash because of resdata.inc
05/19/2014 17:21 Avalion#8
Quote:
Originally Posted by kinerzou View Post
what is the base_value query?

Oh, ok i've find it ! Thanks.
But when i execute the query, they have an error. they have a primary key on g_nSex, i can't add.
It's because the only thing the table is based of sex which causes the errors. You need to add m_nJob to the indexing as well as keeping sex involved.