-1

Hello when i start the server and want to start doing illegal jobs this shows up

brx-drugs/client/client.lua:50: 'then' expected near '='

and here is also a piece of the code

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(1000)
        local pedCoords = GetEntityCoords(GetPlayerPed(-1))
        local dst = #(Config.StartLocation - pedCoords)
        if dst < 200 and jobSpawned = false then
            TriggerEvent ('brx-drugs:spawnJobPed',Config.StartLocation, 217.980
            jobSpawned = true
            refreshJobPed = true
        end
        if dst>= 201 then
            if DoesEntityExist(jobPed) then
                DeletePed(jobPed)
            end
            JobSpawned = false

        end
    end
end)

i dont think the problem is with the config file and i cant get around it since im a new dev

bro xoty
  • 1
  • 2
  • in addition to the broken equality operator that was mentioned in the answer you're also missing `)` in the following line and you probably want to use `jobSpawned`, not `JobSpawned` – Piglet Oct 11 '21 at 13:12

1 Answers1

2

Missing '=' in

if dst < 200 and jobSpawned = false then

jobSpawned = false

Change to

jobSpawned == false

Reinisdm
  • 126
  • 3