Jump to content

Problem with using Type in HeaderFile


Go to solution Solved by Realshadow,

Recommended Posts

Hey, 
currently I am implementing the extended Battlepass (https://metin2hub.com/threads/new-extended-battlepass-system.674/ ).
The Problem is, in the ClientManager.h I get the following Error:

 

./ClientManager.h:455:14: error: use of undeclared identifier 'TBattlePassRanking' 
	455| std::vector<TBattlePassRanking*> m_vec_battlePassRanking;
./ClientManager.h:455:33: error: expected expression
	455| std::vector<TBattlePassRanking*> m_vec_battlePassRanking;
./ClientManager.h:455:14: error: use of undeclared identifier 'TBattlePassRanking'
	455| std::vector<TBattlePassRanking*> m_vec_battlePassRanking;
./ClientManager.h:455:33: error: expected expression
	455| std::vector<TBattlePassRanking*> m_vec_battlePassRanking;

I have declared this type in the common/tables.h
 

#ifdef __BATTLE_PASS_SYSTEM__
typedef struct SPlayerBattlePassMission
{
	DWORD dwPlayerId;
	DWORD dwMissionId;
	DWORD dwBattlePassId;
	DWORD dwExtraInfo;
	BYTE bCompleted;
	BYTE bIsUpdated;
} TPlayerBattlePassMission;

typedef struct SBattlePassRewardItem
{
	DWORD dwVnum;
	BYTE bCount;
} TBattlePassRewardItem;

typedef struct SBattlePassMissionInfo
{
	BYTE bMissionType;
	DWORD dwMissionInfo[3];
	TBattlePassRewardItem aRewardList[MISSION_REWARD_COUNT];
} TBattlePassMissionInfo;

typedef struct SBattlePassRanking
{
	BYTE bPos;
	char playerName[CHARACTER_NAME_MAX_LEN + 1];
	DWORD dwFinishTime;
} TBattlePassRanking;

typedef struct SBattlePassRegisterRanking
{
	BYTE bBattlePassId;
	char playerName[CHARACTER_NAME_MAX_LEN + 1];
} TBattlePassRegisterRanking;
#endif

And in the ClientManager.h I have included the common/tables.h at the start of the file.
My ClientManager.h in the line 455 looks like this:

 

#ifdef __BATTLE_PASS_SYSTEM__
	std::vector<TBattlePassRanking*> m_vec_battlePassRanking;
#endif


Thanks for your Help Guys 🙂

  • Love 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.