Solved Problem of Importing Types in Headerfiles

Member
Aug
Threads
3
31
1
0
6
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 :)
 
Metin2Hub Bot
M2Hub Bot
Feb
Threads
66
2,410
2
1,313
113
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 :)

Hello dear user,

Your post will be under surveillance by bots for the next few hours.

Forum description : Metin2 private server, Metin2 download, Metin2 support, Metin2 Forum, Metin2 Pvp Servers, Errors, Bugs, Requests, Metin2 Pvp Forum, Everything About Metin2.
 
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features of our website. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock