Murilo_apa Posted November 22, 2022 Share Posted November 22, 2022 function giveV(player, car_id) if player then if car_id then local car_id = tonumber(car_id); local dados = getElementData(player, 'garagem'); for i,v in ipairs(dados) do if not v.id == car_id then table.insert(dados, {id = car_id, v.spawned = false}) else return false end end else return false end else return false end end So, I'm having difficulties with an error in a line where I use table.insert, I don't know if this is the real problem. (I'm using the translator) ERROR: Loading script failed: [src]concessionaria\conceC.lua:201: '}' expected near '='; Thanks in advance. Link to comment
Murilo_apa Posted November 22, 2022 Author Share Posted November 22, 2022 200 if not v.id == car_id then 201 table.insert(dados, {id = car_id, v.spawned = false}) 202 else sorry Link to comment
mafioz Posted November 22, 2022 Share Posted November 22, 2022 function giveV(player, car_id) if player then if car_id then local car_id = tonumber(car_id); local dados = getElementData(player, 'garagem'); for i,v in ipairs(dados) do if not v.id == car_id then table.insert(dados, {id = car_id, spawned = false}) else return false end end else return false end else return false end end Link to comment
Murilo_apa Posted November 22, 2022 Author Share Posted November 22, 2022 bro, I you!!!! Link to comment
mafioz Posted November 22, 2022 Share Posted November 22, 2022 2 minutes ago, Murilo_apa said: братан я тебя!!!! If you have any further problems, please contact Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now