Hello, im trying to install pd-spawn, and i crashed into this problem, i’m really not sure how to solve it
When joining and selecting last position
[ 150781] [b2545_GTAProce] MainThrd/ ^1SCRIPT ERROR: @es_extended/client/functions.lua:369: attempt to index a nil value (local 'coords')^7
[ 150781] [b2545_GTAProce] MainThrd/ ^3> ref^7 (^5@es_extended/client/functions.lua^7:369)
[ 150781] [b2545_GTAProce] MainThrd/ ^3> callback^7 (^5@pd-spawn/client/client.lua^7:61)
this is the pd-spawn/client/main.lua
elseif data.choice == "last" then
ESX.Game.Teleport(PlayerPedId(), ESX.PlayerData.coords)
... stuff not important for this
and this is the es_extended/client/functions.lua
function ESX.Game.Teleport(entity, coords, cb)
local vector = type(coords) == "vector4" and coords or type(coords) == "vector3" and vector4(coords, 0.0) or vec(coords.x, coords.y, coords.z, coords.heading or 0.0)
if DoesEntityExist(entity) then
RequestCollisionAtCoord(vector.xyz)
while not HasCollisionLoadedAroundEntity(entity) do
Wait(0)
end
SetEntityCoords(entity, vector.xyz, false, false, false, false)
SetEntityHeading(entity, vector.w)
end
if cb then
cb()
end
end
users.position in SQL is varchar(255)
with default value {"x":-1038.58,"y":-2737.71,"z":20.17,"heading":333.3}
(airport)
im using oxmysql and esx legacy 1.7.0