Now I can place car , but when I remove the car , i teleport to spawn
if use different types of cars, the game bugs but doesn’t crash
Could you provide a saved game where this happens? I've used cars from other mods in my test and they behaved the same as the vanilla car/tank. Also, we don't teleport players, so I guess it's another mod that teleports you back to the spawn point. With a saved game, I could check which other mod is involved.
when I used a lot of spider-trons, the game crashed --> Error while running event autodrive::on_spider_command_completed (ID 172)
autodrive/scripts/pathing.lua:546: bad argument #1 of 3 to 'remove' (table expected, got nil)
stack traceback:
[C]: in function 'remove'
autodrive/scripts/pathing.lua:546: in function 'remove_path_segment'
autodrive/scripts/event_handlers.lua:2202: in function <autodrive/scripts/event_handlers.lua:2187>
Replacing line 546 of scripts/pathing.lua with the following should fix the crash:
if state.path and state.path[1] then
table.remove(state.path, 1)
end
Just unzip the mod, edit the file, and restart Factorio to make sure that the game will use the unzipped (edited) version of Autodrive.