• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

TFS 1.X+ New Item slot when dragging item disappears

henkas

Well-Known Member
Joined
Jul 8, 2015
Messages
1,067
Solutions
5
Reaction score
63
Used this tutorial TFS 1.X+ - Help new inventory slot TFS 1.3 and OTClient (https://otland.net/threads/help-new-inventory-slot-tfs-1-3-and-otclient.264537) i created more slots
creature.h
C++:
enum slots_t : uint8_t {
    CONST_SLOT_WHEREEVER = 0,
    CONST_SLOT_HEAD = 1,
    CONST_SLOT_NECKLACE = 2,
    CONST_SLOT_BACKPACK = 3,
    CONST_SLOT_ARMOR = 4,
    CONST_SLOT_RIGHT = 5,
    CONST_SLOT_LEFT = 6,
    CONST_SLOT_LEGS = 7,
    CONST_SLOT_FEET = 8,
    CONST_SLOT_RING = 9,
    CONST_SLOT_AMMO = 10,
    CONST_SLOT_RING2 = 11,
    CONST_SLOT_EARRING = 12,
    CONST_SLOT_EARRING2 = 13,

    CONST_SLOT_FIRST = CONST_SLOT_HEAD,
    CONST_SLOT_LAST = CONST_SLOT_AMMO,
};
so
CONST_SLOT_RING2 = 11,
CONST_SLOT_EARRING = 12,
CONST_SLOT_EARRING2 = 13, are the new slots i created and this is my inventory.otui InventoryItem < Item $on: image-source: /images/ui/item-blessedHeadS - Pastebin.com (https://pastebin.com/4KPeySFB) when i drag item it just disappears
 
Solution
change
C++:
CONST_SLOT_LAST = CONST_SLOT_AMMO,
to
C++:
CONST_SLOT_LAST = CONST_SLOT_EARRING2,

Whether or not that will fix the original issue, im not sure...
But it's still an error either way
change
C++:
CONST_SLOT_LAST = CONST_SLOT_AMMO,
to
C++:
CONST_SLOT_LAST = CONST_SLOT_EARRING2,

Whether or not that will fix the original issue, im not sure...
But it's still an error either way
 
Solution
Back
Top