[HELP] Console error urgent

Hello i’ve got the following error on my console and i don’t haved a clue what is it can you please help me on that ? I would really appreciate it. Thanks in advance :grin:

well you need esx_truckshop started on the server.cfg and the orangezones resource too, as the error says make sure they are started from the server.cfg.

@DRIFTKING.EVO they’re running already also orange it’s working properly i don’t know what’s that error for.

post the server lua files of both resources and also your server .cfg and IF possible a resmon screenshot showing both resources :slight_smile:

@DRIFTKING.EVO Now i fixed the truck script but i’ve got error when im in game
main.lua 337 attempt to perform arithmetic on a nil value (global 'PlayerCoords)

TruckScript Screnshot

TruckScript Screnshot 2

Orange Zones Main.lua

main.lua
ESX = nil
local PlayerData = {}
local minute
local JobBlips = {}
local apotelesma

Citizen.CreateThread(function()
	while ESX == nil do
		TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
		Citizen.Wait(0)
	end
end)

RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(xPlayer)
	PlayerData = xPlayer
	ESX.TriggerServerCallback('orangezones:isTimeTo', function(result)
		if result then
			CreateDangerZones()
		end
	end)
end)

function CreateBlipCircle(coords, text, radius, color, sprite)
	local blip = AddBlipForRadius(coords, radius)

	SetBlipHighDetail(blip, true)
	SetBlipColour(blip, 81)
	SetBlipAlpha (blip, 128)

	BeginTextCommandSetBlipName("STRING")
	AddTextComponentString(text)
	EndTextCommandSetBlipName(blip)
	table.insert(JobBlips, blip)
end

function CreateBlipCircle2(coords, text, radius, color, sprite)
	local blip = AddBlipForRadius(coords, radius)

	SetBlipHighDetail(blip, true)
	SetBlipColour(blip, 2)
	SetBlipAlpha (blip, 128)

	BeginTextCommandSetBlipName("STRING")
	AddTextComponentString(text)
	EndTextCommandSetBlipName(blip)
	table.insert(JobBlips, blip)
end

function CreateBlipCircle3(coords, text, radius, color, sprite)
	local blip = AddBlipForRadius(coords, radius)

	SetBlipHighDetail(blip, true)
	SetBlipColour(blip, 1)
	SetBlipAlpha (blip, 39)

	BeginTextCommandSetBlipName("STRING")
	AddTextComponentString(text)
	EndTextCommandSetBlipName(blip)
	table.insert(JobBlips, blip)
end

function deleteBlips()
	for k,v in ipairs(JobBlips) do
		RemoveBlip(v)
	end
end


Citizen.CreateThread(function()
	--[[ESX.TriggerServerCallback('orangezones:isTimeTo', function(result)
		apotelesma = result
		if apotelesma then
			CreateDangerZones()
		end
	end)]]
		
	for k,zone in pairs(Config.CircleZones3) do
		CreateBlipCircle3(zone.coords, zone.name, zone.radius, zone.color, zone.sprite)
	end
	
	for k,zone in pairs(Config.CircleZones2) do
		CreateBlipCircle2(zone.coords, zone.name, zone.radius, zone.color, zone.sprite)
	end
end)

function CreateDangerZones()
	for k,zone in pairs(Config.CircleZones) do
		CreateBlipCircle(zone.coords, zone.name, zone.radius, zone.color, zone.sprite)
	end
end

I don’t see you defining PlayerCoords anywhere. You define cords but not PlayerCoords

No it’s the same i found a solution someone said to change PlayerCoords to Coords but it didn’t work. the screenshot was after the change. The problem it’s still there

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.