0

你好,当我启动服务器并想开始做非法工作时,这会出现

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

这也是一段代码

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)

我不认为问题出在配置文件上,我无法解决它,因为我是新开发人员

4

1 回答 1

2

缺少“=”

如果 dst < 200 并且jobSpawned = false那么

jobSpawned =

改成

jobSpawned ==

于 2021-10-11T09:44:12.047 回答