qb-shops icon indicating copy to clipboard operation
qb-shops copied to clipboard

SCRIPT ERROR

Open OnlySOS opened this issue 1 year ago • 9 comments

SCRIPT ERROR: @qb-shops/client/main.lua:55: attempt to indexa nil value (upvalue 'shopInvJson')

^^^This is what im recieivnig, it wont open the shop in the stores but will let you Target the person. ive never touched teh code, even just replaced it.

OnlySOS avatar Jan 29 '24 03:01 OnlySOS

Do you have a json/shops-inventory.json file? If so what does it contain? I assume you have Config.UseTruckerJob = false in your config?

citRaTTV avatar Jan 29 '24 04:01 citRaTTV

@citRaTTV i just looked, apparently there was nothing in my json file.... like the code had been deleted. not sure hown that happened.

OnlySOS avatar Jan 29 '24 05:01 OnlySOS

@citRaTTV i just looked, apparently there was nothing in my json file.... like the code had been deleted. not sure hown that happened.

You can grab a fresh copy from this repo

citRaTTV avatar Jan 29 '24 05:01 citRaTTV

@citRaTTV just re verified, the json provided here has only 2 lines of code.

  1. {
  2. }

OnlySOS avatar Jan 29 '24 05:01 OnlySOS

@citRaTTV this will need an update, as im sure many will have this issue

OnlySOS avatar Jan 29 '24 05:01 OnlySOS

@citRaTTV this will need an update, as im sure many will have this issue

That's all that should be there. The script will write to it.

citRaTTV avatar Jan 29 '24 05:01 citRaTTV

@citRaTTV so is there something else causing my issue?

OnlySOS avatar Jan 29 '24 05:01 OnlySOS

Screenshot 2024-01-28 232442

OnlySOS avatar Jan 29 '24 05:01 OnlySOS

Screenshot 2024-01-28 232442

@OnlySOS Again, this looks like an issue with the JSON file. Make sure that the file is in the proper location: https://github.com/qbcore-framework/qb-shops/blob/main/config.lua#L4 and isn't empty / contains malformed JSON. If you want to send along your config.lua and your shops-inventory.json, I'd be happy to have a look at them.

citRaTTV avatar Feb 16 '24 13:02 citRaTTV

Screenshot 2024-01-28 232442

@OnlySOS Again, this looks like an issue with the JSON file. Make sure that the file is in the proper location: https://github.com/qbcore-framework/qb-shops/blob/main/config.lua#L4 and isn't empty / contains malformed JSON. If you want to send along your config.lua and your shops-inventory.json, I'd be happy to have a look at them.

You think you can help me with mines im having sort of the same issue but its saying no shop inventory

ChiChixxTrigga avatar May 19 '24 07:05 ChiChixxTrigga