Hi all
I am trying to unequip all items into any empty bag slot.
The problem is that I can unequip all items into my bags or into my backpack but not all into any empty slot in both.
This is the code I am trying to run;
Lua Code:
for k, v in pairs(EquipmentSlots) do
PickupInventoryItem(v)
for bag = 0, 4 do
for slot = 0, GetContainerNumSlots(bag) do
local itemID = GetContainerItemID(bag, slot)
if not itemID then
PutItemInBag(slot)
end
end
end
if CursorHasItem() then
PutItemInBackpack()
end
end
If I have enough bagspace the items move into the bags, but if I do not have enough space the leftover items do not drop into the backpack.
I have tried splitting it into 2 separate chunks runnig one after the other with the same results.
It is the backpack one that seems to break it, it will fill the backpack then say "not enough space" and then stop altogether.
Does anyone have any advice/help for me?
Cheers