Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 02:28

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Error exchange advanced

Discussion on Error exchange advanced within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2015
Posts: 10
Received Thanks: 0
Error exchange advanced

hi, now i am copy __EXCHANGE_ADV from Virtuos source to my source and have this error:
anyone me? =)
PHP Code:
f:\nova pasta\source\_common\pocket.h(10): noteconsulte a declaração de 'CItemContainer<CItemElem>'
f:\nova pasta\source\_common\exchangeadv.cpp(192): error C2039'GetItemCount'não é um membro de 'CItemContainer<CItemElem>' 
Code from this archives and respective line:
ExchangeAdv.cpp

Error in line: if( pUser->m_Inventory.GetItemCount( pExchangeItem->m_dwItemNeed ) < pExchangeItem->m_nPrice )

Pocket.h
Error in line: class CPocket : public CItemContainer<CItemElem>

Thanks all =)
*Using vs17.
Techside is offline  
Old 04/10/2020, 07:55   #2
 
elite*gold: 0
Join Date: Mar 2018
Posts: 155
Received Thanks: 54
Ok, let's see. let's go to your error

Code:
note: consulte a declaração de 'CItemContainer<CItemElem>'
Hmm. I think it is on Item.h now lets search

Code:
 template <class T> class CItemContainer
Then let's scroll down and find " GetItemCount "

Oh, I see it.

Code:
	DWORD	Find( DWORD dwItemId )
		{
			if( dwItemId == 0 )
				return NULL_ID;
			for( int i = 0; i < (int)( m_dwIndexNum ); i++ )
			{
				DWORD nId	= m_apIndex[i];
				if( nId < 0 || nId >= m_dwItemMax )
					continue;
				if( m_apItem[nId].m_dwItemId == dwItemId )
					return nId;
			}
			return NULL_ID;
		}	
	DWORD	GetItemCount( DWORD dwItemId )
		{
			if( dwItemId == 0 )
				return 0;
			int nCount	= 0;
			for( int i = 0; i < (int)( m_dwItemMax ); i++ )
			{
				CItemElem* pItemElem	= (CItemElem*)&m_apItem[i];
				if( pItemElem->m_dwItemId == dwItemId )
					nCount	+= pItemElem->m_nItemNum;
			}
			return( nCount );
		}
#endif	// __JEFF_VER_8
#endif	// __CLIENT
Now let's try this

Code:
	DWORD	Find( DWORD dwItemId )
		{
			if( dwItemId == 0 )
				return NULL_ID;
			for( int i = 0; i < (int)( m_dwIndexNum ); i++ )
			{
				DWORD nId	= m_apIndex[i];
				if( nId < 0 || nId >= m_dwItemMax )
					continue;
				if( m_apItem[nId].m_dwItemId == dwItemId )
					return nId;
			}
			return NULL_ID;
		}	
#endif	// __JEFF_VER_8
#endif	// __CLIENT
	DWORD	GetItemCount( DWORD dwItemId )
		{
			if( dwItemId == 0 )
				return 0;
			int nCount	= 0;
			for( int i = 0; i < (int)( m_dwItemMax ); i++ )
			{
				CItemElem* pItemElem	= (CItemElem*)&m_apItem[i];
				if( pItemElem->m_dwItemId == dwItemId )
					nCount	+= pItemElem->m_nItemNum;
			}
			return( nCount );
		}
Hope its help
Tweeney is offline  
Reply




All times are GMT +1. The time now is 02:28.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.