Pointshop2
Pointshop2 copied to clipboard
Inventory space not calculated right?
Currently this methode is used to calculate if a player has free Inventory space:
function Player:PS2_HasInventorySpace( slots )
if not self.PS2_Inventory then
error( "Inventory of " .. tostring( self ) .. " not cached" )
end
local slotsUsed = table.Count( self.PS2_Inventory:getItems() )
local slotsTotal = self.PS2_Inventory:getNumSlots( )
return slotsTotal - slotsUsed - slots >= 0
end
But I would say this is flawed, as it just counts all items you have and checks it to the max amount of slots you have.. But some Items stack and so you have free slots left, but the Shop says you are full.
That's because the item stacking is purely visual
That's because the item stacking is purely visual
Hm okay.. But that is pretty confusing for players.. But well