Autodrive

by Pi-C

Car equipment for train avoidance, logistic network integration, circuit network connectivity, fuel refill, ammo reload, vehicle repair, radio control, enemy targeting, and gate control.

Content
a month ago
0.17 - 1.1
2.97K
Transportation Combat Logistic network Circuit network

g [Fixed?] Crash Error After Completed Pathing

1 year, 10 months ago

Hey Pi-C,

You're doing so great with this mod, that I hate to bother you again. This is a weird error; here's the error message:

Error while running event autodrive::on_tick (ID 0)
atuodrive/libs/assertions.lua:90: Wrong argument! table is not a valid passenger!
stack traceback:
[C]: in function 'error'
autodrive/libs/assertions.lua:90: in function 'arg_err'
autodrive/scripts/sensors/enemy.lua:80: in function 'set_shooter'
autodrive/scripts/driving.lua:596: in function 'tick_vehicle'
autodrive/scripts/event_handlers.lua:968: in function <autodrive/scripts/event_handlers.lua:941>

This occurs only when I use the autodrive remote on a vehicle that specifically has the gate sensor in it. I individually tested every other sensor, and the crash does not occur, only when the gate sensor is included in the vehicle grid and the remote is used. I hope that helps narrow down the issue for you. Please let me know if you need an updated save file or more information. Hope you have an enjoyable weekend!

1 year, 10 months ago

Thanks for the report! I've already fixed that. It can happen that the dummy passenger has been destroyed just before that function was entered, so if the variable "passenger" passed on to the function refers to an invalid object, that should NOT be an error. So the fix is to substitute line 80 in scripts/enemy.lua with this line:

passenger = nil
1 year, 5 months ago

Please try version 1.1.5! :-)

New response