[CODE lang="csharp" title="Verdiği Hata"]
char.cpp: In member function 'bool CHARACTER::CanTakeInventoryItem(LPITEM, TItemPos*)':
char.cpp:11052:60: error: invalid conversion from 'BYTE' {aka 'unsigned char'} to 'LPITEM' {aka 'CItem*'} [-fpermissive]
cell->cell = iEmpty = GetEmptyBookInventory(item->GetSize());
~~~~~~~~~~~~~^~
In file included from char.cpp:6:
char.h:1420:38: note: initializing argument 1 of 'int CHARACTER::GetEmptyBookInventory(LPITEM) const'
int GetEmptyBookInventory(LPITEM pItem) const;
~~~~~~~^~~~~
char.cpp:11057:63: error: invalid conversion from 'BYTE' {aka 'unsigned char'} to 'LPITEM' {aka 'CItem*'} [-fpermissive]
cell->cell = iEmpty = GetEmptyUpgradeInventory(item->GetSize());
~~~~~~~~~~~~~^~
In file included from char.cpp:6:
char.h:1419:41: note: initializing argument 1 of 'int CHARACTER::GetEmptyUpgradeInventory(LPITEM) const'
int GetEmptyUpgradeInventory(LPITEM pItem) const;
~~~~~~~^~~~~
char.cpp:11062:61: error: invalid conversion from 'BYTE' {aka 'unsigned char'} to 'LPITEM' {aka 'CItem*'} [-fpermissive]
cell->cell = iEmpty = GetEmptyStoneInventory(item->GetSize());
~~~~~~~~~~~~~^~
In file included from char.cpp:6:
char.h:1421:39: note: initializing argument 1 of 'int CHARACTER::GetEmptyStoneInventory(LPITEM) const'
int GetEmptyStoneInventory(LPITEM pItem) const;
~~~~~~~^~~~~
[/CODE]
[CODE lang="cpp" title="Char.cpp Kod Bloğu"]bool CHARACTER::CanTakeInventoryItem(LPITEM item, TItemPos* cell)
{
int iEmpty = -1;
if (item->IsDragonSoul())
{
cell->window_type = DRAGON_SOUL_INVENTORY;
cell->cell = iEmpty = GetEmptyDragonSoulInventory(item->GetVnum(), item->GetSubType(), item->GetSize());
}
#ifdef ENABLE_SPECIAL_STORAGE
else if (item->IsBook())
{
cell->window_type = BOOK_INVENTORY;
cell->cell = iEmpty = GetEmptyBookInventory(item->GetSize());
}
else if (item->IsUpgradeItem())
{
cell->window_type = UPGRADE_INVENTORY;
cell->cell = iEmpty = GetEmptyUpgradeInventory(item->GetSize());
}
else if (item->IsStone())
{
cell->window_type = STONE_INVENTORY;
cell->cell = iEmpty = GetEmptyStoneInventory(item->GetSize());
}
#endif
else
{
cell->window_type = INVENTORY;
cell->cell = iEmpty = GetEmptyInventory(item->GetSize());
}
[/CODE]
[CODE lang="cpp" title="Char.h İlgili Satırlar"] bool CanTakeInventoryItem(LPITEM item, TItemPos* pos);
int GetEmptyInventory(BYTE size) const;
int GetEmptyDragonSoulInventory(DWORD dwVnum, BYTE bSubType, LPITEM pItem) const;
void CopyDragonSoulItemGrid(std::vector<WORD>& vDragonSoulItemGrid) const;
#ifdef ENABLE_SPECIAL_STORAGE
int GetSameUpgradeInventory(LPITEM pItem) const;
int GetSameBookInventory(LPITEM pItem) const;
int GetSameStoneInventory(LPITEM pItem) const;
int GetEmptyUpgradeInventory(LPITEM pItem) const;
int GetEmptyBookInventory(LPITEM pItem) const;
int GetEmptyStoneInventory(LPITEM pItem) const;
#endif
int CountEmptyInventory() const;
[/CODE]
item->GetSize() kullanımı yanlış galiba bilgisi olan yardım edebilir mi ?