#Error qb-storerobbery

1 messages · Page 1 of 1 (latest)

iron lion
#

Getting this error in qb-storerobbery (my dev server) - SCRIPT ERROR: @qb-storerobbery/server/main.lua:40: attempt to index a nil value (field '?') ```RegisterNetEvent('qb-storerobbery:server:takeMoney', function(register, isDone)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
if not Player then return end

local playerPed = GetPlayerPed(src)
local playerCoords = GetEntityCoords(playerPed)
if #(playerCoords - Config.Registers[register][1].xyz) > 3.0 or (not Config.Registers[register].robbed and not isDone) or (Config.Registers[register].time <= 0 and not isDone) then
    return DropPlayer(src, "Attempted exploit abuse")
end``` Line 40 is ```    if #(playerCoords - Config.Registers[register][1].xyz) > 3.0 or (not Config.Registers[register].robbed and not isDone) or (Config.Registers[register].time <= 0 and not isDone) then```
frosty sedge
#

Are you using QB's storeRobbery or the QBRemastered one?

iron lion
#

QBCore. Sorry if that aint supported here tho

frozen sable
iron lion
#

Thanks, will try. Do i need ox_lib for that? and does it work with qbcore or do i need QBR?

frozen sable
#

The only thing ox_lib is used for in this one is cache.ped for a total of 8 times in client.lua. If you don't want to download ox_lib purely for that. Replace them all with PlayerPedId()

narrow fractal
#

can make it like people can change minigame in config like vehiclekeys >lua Config.LockPickDoorEvent = function() -- This function is called when a player attempts to lock pick a vehicle TriggerEvent('qb-lockpick:client:openLockpick', LockpickFinishCallback) end

iron lion