i-kulgu / qb-inventory-decay

GNU General Public License v3.0
29 stars 16 forks source link

Error with stashes? these are pre exisitng stashes #3

Open TlYPN opened 2 years ago

TlYPN commented 2 years ago

https://gyazo.com/3c7d3e6a78922224b4bcb3c154aad3de

TlYPN commented 2 years ago

actually pre existing has nothing to do with it. this is not completely random. players can use a stash for x amount of time and then all of a sudden later on they cant

Zeky0526 commented 2 years ago

you fixed it?

Zeky0526 commented 2 years ago

we have same error.. the value in stash have Nan. after close it cant open also if you drag the item from stash to inventory . the item will be vanished

i-kulgu commented 2 years ago

Can you download the latest version and try it out ?

LYRYCAL commented 2 years ago

install a fresh qbcore & latest version of this qb-inventory but still facing this problems.

SmithyDevelopment commented 1 year ago

I posted this on the QB discord as well, but here is the fix for existing stashes..

OK so to fix your old stashes etc, you need to edit your database. If you use something like Heidisql then thats the same way i did. you need to use the search and replace method, search and replace text (shortcut is CTRL-F) enter text to find, and replace with, leave options unticked, leave the rest set to Forward, Entire scope, Global. for example.. Changes made to Database Table 'players' - Data 'inventory' & to Table 'stashitems' - Data 'items'

"info":"" & "info":[] (2 different style of entry exist) changed to "info":{"quality":100}

Do this for all other stash locations you have, custom ones, houses glovebox, trunk etc..

Once you add the decay lines to your shared items.lua, It will then add the "created" part to the database automatically.