• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] AH Bot Compile Error

Status
Not open for further replies.

Barebones

BETA Tester
Wotlk TC 3.3.5a Compile Error:

error C2061: syntax error : identifier 'AuctionEntry' c:\users\keith\desktop\trinitycore\src\server\game\auctionhouse\AuctionHouseBot\AuctionHouseBot.h 1241 1 LuaEngine

This is the Auctionhousebot.h where the error points to:

public:
~AuctionHouseBot();
void Update();
void Initialize();
void LoadValues(AHBConfig*);
void DecrementItemCounts(AuctionEntry* ah, uint32 itemEntry);
void IncrementItemCounts(AuctionEntry* ah);
void Commands(uint32, uint32, uint32, char*);
uint32 GetAHBplayerGUID() { return AHBplayerGUID; };
 

Tommy

Founder
Need a bit more information. Why does it say 'LuaEngine' in the error result? Are you including the file that has 'AuctionEntry'?
 

Barebones

BETA Tester
i'm not sure why it says lua engine. -I do have Eluna Compile with this- I applied it with a .diff and the auctionhousebot.cpp and .h went to "src\server\game \auctionhouse\AuctionHouseBot\" and the auctionhousemgr.cpp and .h went to "src\server\game \auctionhouse".

This is part of the auctionhouse.cpp:

void AuctionHouseBot::IncrementItemCounts(AuctionEntry* ah)
{
// from auctionhousehandler.cpp, creates auction pointer & player pointer

// get exact item information
Item *pItem = sAuctionMgr->GetAItem(ah->itemGUIDLow);
if (!pItem)
{
if (debug_Out) TC_LOG_ERROR("misc", "AHBot: Item %u doesn't exist, perhaps bought already?", ah->itemGUIDLow);
return;
}

// get item prototype
ItemTemplate const* prototype = sObjectMgr->GetItemTemplate(ah->itemEntry);

AHBConfig *config;

FactionTemplateEntry const* u_entry = sFactionTemplateStore.LookupEntry(ah->GetHouseFaction());
if (!u_entry)
{
if (debug_Out) TC_LOG_ERROR("misc", "AHBot: %u returned as House Faction. Neutral", ah->GetHouseFaction());
config = &NeutralConfig;
}
else if (u_entry->ourMask & FACTION_MASK_ALLIANCE)
{
if (debug_Out) TC_LOG_ERROR("misc", "AHBot: %u returned as House Faction. Alliance", ah->GetHouseFaction());
config = &AllianceConfig;
}
else if (u_entry->ourMask & FACTION_MASK_HORDE)
{
if (debug_Out) TC_LOG_ERROR("misc", "AHBot: %u returned as House Faction. Horde", ah->GetHouseFaction());
config = &HordeConfig;
}
else
{
if (debug_Out) TC_LOG_ERROR("misc", "AHBot: %u returned as House Faction. Neutral", ah->GetHouseFaction());
config = &NeutralConfig;
}

config->IncItemCounts(prototype->Class, prototype->Quality);
}
 
Last edited:

Barebones

BETA Tester
I also have

16> Building Custom Rule C:/Users/Keith/Desktop/Trinitycore/src/LuaEngine/CMakeLists.txt
16> CMake does not need to re-run because C:\Users\Keith\Desktop\Build\src\LuaEngine\CMakeFiles\generate.stamp is up-to-date.
16>ClCompile:
16> HookMgr.cpp
16> LuaEngine.cpp
16> LuaFunctions.cpp
16>c:\users\keith\desktop\trinitycore\src\server\game\auctionhouse\AuctionHouseBot/AuctionHouseBot.h(1240): error C2061: syntax error : identifier 'AuctionEntry'
16>c:\users\keith\desktop\trinitycore\src\server\game\auctionhouse\AuctionHouseBot/AuctionHouseBot.h(1241): error C2061: syntax error : identifier 'AuctionEntry'
16>c:\users\keith\desktop\trinitycore\src\server\game\auctionhouse\AuctionHouseBot/AuctionHouseBot.h(1240): error C2061: syntax error : identifier 'AuctionEntry'
16>c:\users\keith\desktop\trinitycore\src\server\game\auctionhouse\AuctionHouseBot/AuctionHouseBot.h(1241): error C2061: syntax error : identifier 'AuctionEntry'
16>

Maybe I need to add #include "Auctionhousebot.h" and #include "Auctionhousemgr.h" to luafunctions.cpp?
 
Last edited:
Status
Not open for further replies.
Top