Ppgtjmad / SimpleShops

[HG] Simple Shops
27 stars 8 forks source link

Player unable to buy items even if there is still room in Inventory #72

Closed RotasOpera closed 1 year ago

RotasOpera commented 1 year ago

I've been observing a weird issue where I will receive the error "It seems like your inventory is either full or it can't hold that many items" when buying items. I still have plenty of room in my inventory. I was able to get around this by placing items on the ground, buying the other items and then picking the items back off the ground. The limit seems to be at roughly 46Kg. No Idea if this has anything to do with it

I also observed that items above this limit also don't get saved to the ext3DB. So logging and back in will make a bunch of stuff disappear.

I already looked at the corresponding function if([_selectedItem,true,_qty] call HG_fnc_handleItems) then { private["_config","_displayName"]; _config = [_selectedItem] call HG_fnc_getConfig; _displayName = getText(configFile >> _config >> _selectedItem >> "displayName"); if(_price > 0) then { [_price,1] call HG_fnc_addOrSubCash; }; hint format[(localize "STR_HG_ITEM_BOUGHT"),_qty,_displayName,if(_price <= 0) then {(localize "STR_HG_DLG_FREE")} else {([_price,true] call HG_fnc_currencyToText)}]; HG_ITEMS_BOUGHT = true; } else { hint (localize "STR_HG_INVENTORY_FULL"); }; but I don't really see a limitation here. Is this intentional behaviour? If not, might this be a DB character limit? We're using KAT ADV medical, which creates a lot of very small items which our medics are required to carry.

Ppgtjmad commented 1 year ago

Hello @RotasOpera,

Does it only happen with KAT ADV items? Could you please copy/paste your items shop config here https://pastebin.com/

Thank you.

RotasOpera commented 1 year ago

Items shop config here: https://pastebin.com/4pfPwSwZ HG_Config here: https://pastebin.com/qUaR9j31

No, KAT was just an example. I had magazines and grenades disappear on me, maybe also some smaller stuff, not sure. It's hard to notice. Here is the DB entry for my character after saving: https://pastebin.com/uezhMvQw

Ppgtjmad commented 1 year ago

I don't see anything wrong.

Could you try to reproduce the issue and share your logs? I'll have a look.