jimathy / jim-shops

QBCore QB-Menu based replacement for qb-shops
53 stars 42 forks source link

Ammunations not working for me. #7

Closed Carinius closed 2 years ago

Carinius commented 2 years ago

Hey, I threw your awesome stores on my server. Everything works very well, except for the ammunations. The NPC is there but when I select and want to open the menu, he first does nothing and when I do it a second time, he kicks me off the server. These are the errors: [ script:jim-shops] SCRIPT ERROR: @jim-shops/server.lua:151: attempt to index a nil value (local 'Player') [ script:jim-shops] > TriggerCallback (@qb-core/server/functions.lua:207) [ script:jim-shops] > handler (@qb-core/server/events.lua:110) [ script:qb-core] SCRIPT ERROR: error object is not a string [ script:qb-core] (nil stack trace)SCRIPT ERROR: @jim-shops/server.lua:151: attempt to index a nil value (local 'Player')

Do you know what this could be? Greetings Carinius Bild_2022-04-19_124504125

jimathy commented 2 years ago

Well..line 151 points directly to: unique = itemInfo["unique"],

I'm not sure how you could be getting that error there

Carinius commented 2 years ago

Wow thank you so much for your sooo fast reply Here is a screenshot of my server.lua line 151 shops lua

jimathy commented 2 years ago

I'd recommend updating, your missing a few lines from what I can see there. Try a newer version and let me know if that works

Carinius commented 2 years ago

I have now updated and the same problem disc update 110 207

jimathy commented 2 years ago

Well for some reason it just can't find the player...and I wouldn't know where to start with that

The error is it trying to find something in the server and breaking when it finds nothing, which would happen if it can't find the player..but again, no idea why it can't find your player from it

Carinius commented 2 years ago

Okay, I'll have to see what the problem is. Possibly the license. I have to look but thanks for your quick answer and help

jimathy commented 2 years ago

Yea, its weird, I can only get that error by removing "source" from line 160 https://i.imgur.com/sKsmVrT.jpeg

Carinius commented 2 years ago

I have found the error. My adminchar was buggy. Created a new one and now it works. Only that it shows me no firearms, although the char has a license.... Never mind that I get it right. Many many thanks again for everything <3