Thanks, that makes sense! "AAI Programmable vehicles" will remove the flamethrower of the vanilla tank if aai-vehicles-flame-tank is used, and the machine gun if aai-vehicles-chaingunner is active. If the last weapon used by your vanilla tank was in slot 2 or slot 3, it wouldn't be available anymore, so the game would crash.
I'm still dealing with some other bug, so I can't upload my WIP version yet. But you can patch this yourself by unpacking Autodrive and editing file vehicle_lists.lua in its top directory. Go to line 927 and replace
for v, vehicle in pairs(vehicles) do
inv_type = (vehicle.type == "car") and "car" or "spider"
trunk = vehicle.get_inventory(defines.inventory[inv_type.."_trunk"])
clip = vehicle.get_inventory(defines.inventory[inv_type.."_ammo"])
guns = vehicle_map[vehicle.type][vehicle.name].guns
for slot = 1, #clip do
with
for v, vehicle in pairs(vehicles) do
inv_type = (vehicle.type == "car") and "car" or "spider"
trunk = vehicle.get_inventory(defines.inventory[inv_type.."_trunk"])
clip = vehicle.get_inventory(defines.inventory[inv_type.."_ammo"])
guns = vehicle_map[vehicle.type][vehicle.name].guns
if guns and vehicle.selected_gun_index > #guns then
vehicle.selected_gun_index = #guns
end
for slot = 1, #clip do