ShyD 34 Posted January 15, 2023 Share Posted January 15, 2023 hey guys, i have this error in my first core from ch1... any idea ? i did not changed anything in this function... LPITEM CItem::RemoveFromCharacter() { if (!m_pOwner) { sys_err("Item::RemoveFromCharacter owner null"); return (this); } LPCHARACTER pOwner = m_pOwner; if (m_bEquipped) // �����Ǿ��°�? { Unequip(); //pOwner->UpdatePacket(); SetWindow(RESERVED_WINDOW); Save(); return (this); } else { if (GetWindow() != SAFEBOX && GetWindow() != MALL) { if (IsDragonSoul()) { if (m_wCell >= DRAGON_SOUL_INVENTORY_MAX_NUM) sys_err("CItem::RemoveFromCharacter: pos >= DRAGON_SOUL_INVENTORY_MAX_NUM"); else pOwner->SetItem(TItemPos(m_bWindow, m_wCell), NULL); } #ifdef ENABLE_SWITCHBOT else if (m_bWindow == SWITCHBOT) { if (m_wCell >= SWITCHBOT_SLOT_COUNT) { sys_err("CItem::RemoveFromCharacter: pos >= SWITCHBOT_SLOT_COUNT"); } else { pOwner->SetItem(TItemPos(SWITCHBOT, m_wCell), NULL); } } #endif else { TItemPos cell(INVENTORY, m_wCell); #ifdef ENABLE_SPECIAL_INVENTORY bool defaultSpecialInventoryPosition = GetSpecialInventoryType() != -1 && cell.IsSpecialInventoryPosition(); if (false == cell.IsDefaultInventoryPosition() && false == cell.IsBeltInventoryPosition() && false == defaultSpecialInventoryPosition) #else if (false == cell.IsDefaultInventoryPosition() && false == cell.IsBeltInventoryPosition()) #endif sys_err("CItem::RemoveFromCharacter: Invalid Item Position"); else { pOwner->SetItem(cell, NULL); } } } m_pOwner = NULL; m_wCell = 0; SetWindow(RESERVED_WINDOW); Save(); return (this); } } this is my remove item function Link to comment Share on other sites More sharing options...
PeaceMaker 121 Posted January 15, 2023 Share Posted January 15, 2023 You can't just say you have a problem and throw a piece of code and expect people to guess it. Start by describing the issue and specify when or how does it occur. And provide some more information such as syserr, syslog or preferably a stack dump from your core file... Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now