我正在尝试使用修改后的框架(ESX(legacy))在游戏(FiveM)中运行此“脚本”,并且在尝试执行该功能时出现此错误:(确切行的代码:
function deleteLastObject(object_end, x, y, z)
ESX.Game.DeleteObject(ESX.Game.GetClosestObject(object_end, { -----------> line 265
x = x,
y = y,
z = z
}))
end
function spawnEndObject(object_start, object_end, x, y, z)
if isActionStarted then
ESX.Game.SpawnObject(object_end, {
x = x,
y = y,
z = z
}, function(obj)
deleteLastObject(object_start, x, y, z) -----------> line 257
SetEntityHeading(obj, GetEntityHeading(GetPlayerPed(-1)))
PlaceObjectOnGroundProperly(obj)
end)
end
end
如果有人帮助我会很高兴:)