[ script:lg_stores] SCRIPT ERROR: @lg_stores/Server/Configurate.lua:221: attempt to compare number with nil
code is :
if use_weight_system then
-- This function will return TRUE if the player has enough space in his inventory
function canCarryItem(source, weight)
local xPlayer = QBCore.Functions.GetPlayer(source)
if xPlayer then
local maxWeight = QBCore.Config.Player.MaxWeight
local totalWeight = QBCore.Player.GetTotalWeight(xPlayer.PlayerData.items)
return ( (totalWeight + weight) <= maxWeight )
end
return false
end
else
The error line is :
return ( (totalWeight + weight) <= maxWeight )