Adding quick jobchanger problem.

06/04/2014 14:09 marvincod1#1
Hello,

Can anyone help me out here?

I'm adding quick jobchanger but i get this error:

WorldServer error LNK2019: unresolved external symbol "private: void __thiscall CDPSrvr::OnUpdateJob(class CAr &,unsigned long,unsigned long,unsigned char *,unsigned long)" (?OnUpdateJob@CDPSrvr@@AAEXAAVCAr@@KKPAEK@Z) referenced in function "public: __thiscall CDPSrvr::CDPSrvr(void)" (??0CDPSrvr@@QAE@XZ)

I've been struggling for hours now..

this is the full function of CDPSrvr::OnUpdateJob

Code:
#ifdef __BEASTJobchanger
void CDPSrvr::OnUpdateJob( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE, u_long )
{
CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );

if( IsValidObj( pUser ) == TRUE )
{
int nJob, nLevel;
ar >> nJob;
if( pUser->m_nJob >= nJob )
return;
if( nJob < MAX_EXPERT && pUser->m_nLevel != MAX_JOB_LEVEL )
return;
else if( nJob >= MAX_EXPERT && nJob < MAX_PROFESSIONAL && pUser->m_nLevel != (MAX_EXP_LEVEL + MAX_JOB_LEVEL) )
return;
else if( nJob >= MAX_PROFESSIONAL && nJob < MAX_HERO && pUser->m_nLevel != MAX_GENERAL_LEVEL && pUser->GetExpPercent() != 9999 ) 
return;
else if( nJob >= MAX_HERO && pUser->m_nLevel != MAX_LEGEND_LEVEL && pUser->GetExpPercent() != 9999 )
return;

if( nJob < MAX_EXPERT )
nLevel = MAX_JOB_LEVEL;
else if( nJob < MAX_PROFESSIONAL )
nLevel = MAX_JOB_LEVEL + MAX_EXP_LEVEL;
else if( nJob < MAX_MASTER )
nLevel = MAX_JOB_LEVEL + MAX_EXP_LEVEL;
else if( nJob < MAX_HERO )
nLevel = MAX_GENERAL_LEVEL;
else if( nJob < MAX_JOB )
nLevel = MAX_LEGEND_LEVEL;
else
return;

pUser->InitFastJobChange( nJob, nLevel, TRUE );
}
}
#endif //beastjobchanger
Help will be much appreciated! :)

~Me
06/04/2014 14:16 Lumi#2
Did you check all your codes that you have added?
It seems that you forgot something.
06/04/2014 14:26 marvincod1#3
Quote:
Originally Posted by ​Lumi View Post
Did you check all your codes that you have added?
It seems that you forgot something.
Yup i did, i even downloaded GOH source and copyed all the codes from there to my source. But no succes >.<
06/04/2014 14:33 .SnoX#4
*YOLOCODE**YOLOCODE**YOLOCODE**YOLOCODE**YOLOCODE* *YOLOCODE**YOLOCODE**YOLOCODE**YOLOCODE*
*YOLOCODE**YOLOCODE**YOLOCODE**YOLOCODE**YOLOCODE* *YOLOCODE**YOLOCODE**YOLOCODE**YOLOCODE**YOLOCODE*
06/04/2014 14:36 marvincod1#5
Quote:
Originally Posted by .SnoX View Post
*YOLOCODE**YOLOCODE**YOLOCODE**YOLOCODE**YOLOCODE* *YOLOCODE**YOLOCODE**YOLOCODE**YOLOCODE*
*YOLOCODE**YOLOCODE**YOLOCODE**YOLOCODE**YOLOCODE* *YOLOCODE**YOLOCODE**YOLOCODE**YOLOCODE**YOLOCODE*
hahaha ye, i added myself a define name because on the release there wasn't one ;p

and i have defined in both versioncommon.h files.
06/04/2014 15:41 raventh1984#6
Did you have only 1 UpdateJob inside DPSrvr.cpp?

Or more?
06/04/2014 16:40 marvincod1#7
Quote:
Originally Posted by raventh1984 View Post
Did you have only 1 UpdateJob inside DPSrvr.cpp?

Or more?
nop.

this one:

Code:
#ifdef __BEASTjobchanger
	ON_MSG( PACKETTYPE_UPDATE_JOB, OnUpdateJob );
#endif //beast jobchanger
and this one:

Code:
#ifdef __BEASTJobchanger
void CDPSrvr::OnUpdateJob( CAr & ar, DPID dpidCache, DPID dpidUser, LPBYTE, u_long )
{
    try
    {
        CUser* pUser = g_UserMng.GetUser( dpidCache, dpidUser );
        
        if( IsValidObj( pUser ) == TRUE )
        {
			int nJob, nLevel;
            ar >> nJob >> nLevel;
			if( pUser->m_nJob >= nJob )
				return;
			if( nJob < MAX_EXPERT && pUser->m_nLevel != 15 )
				return;
			else if( nJob >= MAX_EXPERT && nJob < MAX_PROFESSIONAL && pUser->m_nLevel != 60 )
				return;
			else if( nJob >= MAX_PROFESSIONAL && nJob < MAX_HERO && pUser->m_nLevel != 120 && pUser->GetExpPercent() != 9999 ) 
				return;
			else if( nJob >= MAX_HERO && pUser->m_nLevel != 129 && pUser->GetExpPercent() != 9999 )
				return;

			pUser->InitLevelPumbaaa( nJob, nLevel, TRUE );
		}
    }
    catch(...)
    {
        Error("Exception caught in File %s on line %d", __FILE__, __LINE__);
    }
}
#endif //beastjobchanger
which should be fine..

i removed; CDPSrvr:: now neuz compills fine, but now the world still has the same problem..
06/04/2014 23:36 Lumi#8
Did you add 2 files to project neuz (& world) ? I think its called WndJobChangeEx.h and .cpp.
06/05/2014 09:13 marvincod1#9
Quote:
Originally Posted by ​Lumi View Post
Did you add 2 files to project neuz (& world) ? I think its called WndJobChangeEx.h and .cpp.
also to the world?