Getting this error in the F8 console. No idea why this just started happening. I noticed it when I went to the police armoury and the ped hadn't spawned to third eye to open the armoury. It was working fine but we have added a ton of scripts here lately but nothing having to do with shops that I'm aware of.
#QB- Shops index nil value error
1 messages · Page 1 of 1 (latest)
thats all i can say, provide more details..
What do you mean by print the coords? Sorry I'm very new and learning as I go. I'm normally able to figure stuff out after extensive Google searches but this has stumped me lol
What changes did you make in qb-shops?
The only thing I remember changing recently is removing the section about cocaine processing enter and exit because we installed a drug script that told us to do that. That's all we've done recently that's I'm aware of.
Wait, no that was in the smallresources I think so disregard that. I don't know of anything we've changed that I can think of aside from coordinates for certain things and everything we changed was working fine and then this started happening all of the sudden. We haven't changed coords on anything in a while.
@gritty lotus any ideas on what it could be or any more information I could get you to see if you can help?
qb-shops client/main.lua:51
https://github.com/qbcore-framework/qb-shops/blob/4c4082efd9d582355e6b564e95dd3bb1d10e0961/client/main.lua#L51
Show us your Config.Locations:
https://github.com/qbcore-framework/qb-shops/blob/4c4082efd9d582355e6b564e95dd3bb1d10e0961/config.lua#L168
My qb-shops client/main.lua:51 matches that exactly.
This is the only thing we've added to the shops lua and followed the install guide of the script it's from to a T. I'm assuming something is wrong with this code?
@rugged thunder ^
Delete line 861-865
So this is the readme for the script these are for and why we put those in. Do they need to be put in a different way?
It says Config.Products and you put it in Config.Locations
Shit.....you right, I feel like a fucking idiot now...lol let me move those to where they're supposed to be and I'll get right back to you.
Don't be hard on yourself, mistakes happen, especially when you're just starting out.
I'm very new but I feel like I've defintely come a long way from where I started. I was super tired last night when I put this script in so I guess I missed the whole config.products part lol
Next time you run into something like this try doing what I did: see the line the error references, see what it's calling, etc, etc. Trace it down.
I promise I tried that first but I guess where I'm so new I wasn't realizing what it was saying till it was shown to me lol I usually try my hardest to research a problem and fix it myseld before asking for help so I can learn from the mistake and not have the answer handed to me.
Anyway, that worked and everything is kosher again lol thanks so much for your help!