我正试图在游戏(FiveM(中使用修改后的框架(ESX(legacy((运行此"脚本",在尝试执行此功能时出现以下错误:(精确行的代码:
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
如果有人帮忙,我会很高兴:(
不要在表中使用X、Y、Z,而是使用vector3(X、Y和Z(。