qbcore-framework / qb-shops

Shops For QB-Core
GNU General Public License v3.0
27 stars 215 forks source link

SCRIPT ERROR #163

Closed OnlySOS closed 3 months ago

OnlySOS commented 7 months ago

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.

citRaTTV commented 7 months ago

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?

OnlySOS commented 7 months ago

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

citRaTTV commented 7 months ago

@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

OnlySOS commented 7 months ago

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

  1. {
  2. }
OnlySOS commented 7 months ago

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

citRaTTV commented 7 months ago

@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.

OnlySOS commented 7 months ago

@citRaTTV so is there something else causing my issue?

OnlySOS commented 7 months ago

Screenshot 2024-01-28 232442

citRaTTV commented 6 months ago

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.

ChiChixxTrigga commented 3 months ago

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