esx_realparking
esx_realparking copied to clipboard
attempt to index a nil value (field '?')
There is something wrong with this.
function DeleteLocalVehicle(vehicle) for i = 1, #LocalVehicles do if type(vehicle.plate) ~= 'nil' and type(LocalVehicles[i].plate) ~= 'nil' then if vehicle.plate == LocalVehicles[i].plate then local tmpModel = GetEntityModel(veh) SetModelAsNoLongerNeeded(tmpModel) DeleteEntity(LocalVehicles[i].entity) table.remove(LocalVehicles, i) end end end end
The line that is causing that problem is: if type(vehicle.plate) ~= 'nil' and type(LocalVehicles[i].plate) ~= 'nil' then
This function is called on SpawnVehicle / SpawnVehicles, and this is when it gives me the error in the console.
me too XD
This error is still there, fix? anyone?