Hey!
I get an error by a comparison in a farming script.
It worked on fewer ESX, but on the new i think the tools or something are different.
local function HarvestKoda(source)
SetTimeout(Config.TimeToFarm, function()
if PlayersHarvestingKoda[source] then
local xPlayer = ESX.GetPlayerFromId(source)
local koda = xPlayer.getInventoryItem('banane')
if koda.limit ~= -1 and koda.count >= koda.limit then
TriggerClientEvent('esx:showNotification', source, _U('taschen_voll'))
else
xPlayer.addInventoryItem('banane', 1)
HarvestKoda(source)
end
end
end)
end
(ERROR: SCRIPT ERROR: @RV_bananen/server/main.lua:34: attempt to compare nil with number)
How do i have to change it?
Help would be great!