Reputation: 65
I have little problem. I am getting the error mentioned in the title while compiling. The line where the error appears is pItemData->GetName(), line.
But even if I change the order, whatever is on that line gives the same error about it.
When I remove the #ifdef tags, their problems go away. But when I add these, this problem arises.
'void CPythonTextTail::RegisterItemTextTail(DWORD,const char *,CGraphicObjectInstance *,char *)' : 3 arguments cannot be converted from 'const char *' to 'CGraphicObjectInstance *'.
Related files and definitions(.h file):
#ifdef ENABLE_WEAPON_EVOLUTION_SYSTEM
void CPythonTextTail::RegisterItemTextTail(DWORD VirtualID, const char* c_szText,
CGraphicObjectInstance* pOwner, char * evolutionMergeText)
#else
void CPythonTextTail::RegisterItemTextTail(DWORD VirtualID, const char* c_szText,
CGraphicObjectInstance* pOwner)
#endif
Error line(.cpp file)
#ifdef ENABLE_WEAPON_EVOLUTION_SYSTEM
char evolutionMergeText[100]; char evolutionText[6][10] = { "", "Yaygın ", "Seyrek ", "Nadir
", "Efsane ", "Eşsiz " };
sprintf(evolutionMergeText, "%s%s", evolutionText[evolution], pItemData->GetName());
#endif
rkTextTail.RegisterItemTextTail(
dwVirtualID,
#ifdef ENABLE_WEAPON_EVOLUTION_SYSTEM
evolutionMergeText,
#endif
pItemData->GetName(),
&pGroundItemInstance->ThingInstance
);
Upvotes: 0
Views: 92
Reputation: 38893
The order of the parameters is wrong. evolutionMergeText
argument is the last in the function. Change the order
rkTextTail.RegisterItemTextTail(
dwVirtualID,
pItemData->GetName(),
&pGroundItemInstance->ThingInstance
#ifdef ENABLE_WEAPON_EVOLUTION_SYSTEM
, evolutionMergeText
#endif
);
Upvotes: 0