LiamDormon/bt-target

hello

Closed this issue · 2 comments

Citizen.CreateThread(function()
AddTargetBone(bones, {
options = {
{
event = "door",
icon = "fas fa-door-open",
label = "Toggle Door",
},
{
event = "unlock",
icon = "fas fa-door-open",
label = "Unlock Door",
},
},
job = {"police", "ambulance", "mechanic"},
distance = 1.5
})
end)

bad argument #1 to 'pairs' table expected, got nill

function AddTargetBone(bones, parameteres)
for _, bone in pairs(bones) do
Bones[bone] = parameteres
end
end

this is my issues

You need to pass a table of bones, not a nil variable, read the documentation