Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AddItem putting a string into the created date field #38

Closed
wants to merge 1 commit into from

Conversation

Jamesking56
Copy link

Describe Pull request
When recyclejob calls AddItem, it gives a string in the created field instead of a timestamp, causing inventory scripts to crash.

Questions (please complete the following information):

  • Have you personally loaded this code into an updated qbcore project and checked all it's functionality? Yes
  • Does your code fit the style guidelines? Yes
  • Does your PR fit the contribution guidelines? Yes

@Sanriku-Gaming
Copy link

But, that's the reason that the item is being given. Looking at the new AddItem function in qb-inventory.

Your Code: exports['qb-inventory']:AddItem(src, randItem, amount, false, false, os.time())
QB Inventory: function AddItem(identifier, item, amount, slot, info, reason)

Are you using the latest qb-inventory with this updated qb-recyclejob?

@Jamesking56
Copy link
Author

But, that's the reason that the item is being given. Looking at the new AddItem function in qb-inventory.

Your Code: exports['qb-inventory']:AddItem(src, randItem, amount, false, false, os.time()) QB Inventory: function AddItem(identifier, item, amount, slot, info, reason)

Are you using the latest qb-inventory with this updated qb-recyclejob?

Aha I see, we're using ps-inventory which has a created date instead of a reason as the last parameter:

https://github.com/Project-Sloth/ps-inventory/blob/5406016f4774168b9eeefebfccf82695c7a89f6b/server/main.lua#L141

@Sanriku-Gaming
Copy link

Yea, so you'll need to edit your functions/events, but not the main repo.

@Jamesking56 Jamesking56 deleted the patch-2 branch June 21, 2024 09:13
@Jamesking56 Jamesking56 restored the patch-2 branch June 21, 2024 09:13
@Jamesking56 Jamesking56 deleted the patch-2 branch June 21, 2024 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants